Page 1 of 1

Gas sensors example code

Posted: Fri May 17, 2019 1:06 pm
by Antonios
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

Re: Gas sensors example code

Posted: Mon May 20, 2019 10:34 am
by libelium-dev
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

Re: Gas sensors example code

Posted: Wed May 22, 2019 11:44 am
by Antonios
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

Re: Gas sensors example code

Posted: Thu May 23, 2019 9:37 am
by libelium-dev
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