Arduino Library
The Electrochemical Gas Sensor Soldered library reads this board through
the ElectrochemicalGasSensor class in Electrochemical-Gas-Sensor-SOLDERED.h.
Give it a sensor preset and an address, and it returns the gas concentration in
PPM. Its hydrogen sulphide preset, SENSOR_H2S, is written for the
SGX-4H2S-100 cell and reads about 2.6 times too low with this board's
SGX-4H2S-300 cell, so use a custom sensor type with 460 nA per ppm instead, as
Use a custom sensor configuration
explains.
Not installed yet? Follow Quick Start before using the functionality pages.
Functionality
Each page starts with one verified library example and explains every function the example uses to get that result.
Arduino exampleRead the gas concentrationStart the board at 0x30 and print the gas concentration in PPM every 2.5 seconds.Arduino exampleRead one sensorTalk to the ADC at the library's default address, 0x49, directly and print PPM every 2.5 seconds.Arduino exampleAverage several readingsAverage five readings taken three seconds apart and print the result in PPM.Arduino exampleCalibrate the zero pointAdd a voltage offset so the reading sits at zero with none of the target gas.Arduino exampleUse a custom addressCreate the sensor at an address and configuration pin you choose.Arduino exampleUse a custom sensor configurationSet the cell sensitivity and the front-end settings yourself.Arduino exampleRead two sensorsCreate two sensor objects at two ADC addresses and print one reading in PPM and one in PPB.