Gas sensors example code

Everything about programming the platform and using the Waspmote API
Post Reply
Antonios
Posts: 10
Joined: Tue Feb 09, 2016 5:53 pm

Gas sensors example code

Post by Antonios » Fri May 17, 2019 1:06 pm

Hello guys,

Could you please help me with my gas sensors. I bought a Carbon dioxide (CO2), A Nitric dioxide (NO2) and an Ozone (O3) gas sensor.
Is this an example code to program all my sensors? CO2 is not included unless there is a typo..
http://www.libelium.com/development/was ... as-sensors

Thank you very much for the help.
Antonios

libelium-dev
Posts: 27967
Joined: Mon Sep 28, 2009 1:06 pm

Re: Gas sensors example code

Post by libelium-dev » Mon May 20, 2019 10:34 am

Hi Antonios,

Are the sensors read using a P&S Smart Cities PRO or Smart Environment PRO? Depending to the node used you will need to use the examples for SCP or SEP.

You can see the example code to read CO2 sensors in the following link. This code is similar to the above but it turns OFF the sensor.
http://www.libelium.com/development/was ... s-sensors/

Regards

Antonios
Posts: 10
Joined: Tue Feb 09, 2016 5:53 pm

Re: Gas sensors example code

Post by Antonios » Wed May 22, 2019 11:44 am

Hello and thanks for the reply.

The sensors are using P&S Smart Cities PRO, how you can tell that the readings taken from the sensors are ok since all the examples have a similar "gas concentration" ? so if we change the values accordingly e/g/ O3, CO2 etc. the code can be the same in all cases?

Thank you once again for the support.

I look forward to hearing back from you.

Kind regards,
Antonios

libelium-dev
Posts: 27967
Joined: Mon Sep 28, 2009 1:06 pm

Re: Gas sensors example code

Post by libelium-dev » Thu May 23, 2019 9:37 am

Hi,

As you can see in the example codes, all gas sensors are read in the same way. It isn't needed to specify the kind of sensor since the node detects it internally in the libraries.

Regards

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest