MicroPython Library
The Soldered Electrochemical Gas Sensor MicroPython library reads this board
through its ATtiny404 and returns the gas concentration in ppm. It is three
files: ElectrochemicalGasSensor.py, the class you use, and the helpers
ads1115.py and lmp91000.py. Create the sensor with a preset (SENSOR_NO2
is the one for this board's SGX-4NO2 cell), and an I2C object, then
call begin().
Not installed yet? Follow Quick Start before using the functionality pages.
Functionality
Each page starts with one verified module example and explains every function the example uses to get that result.
MicroPython exampleRead the NO2 concentrationStart the sensor at address 0x30 and print the gas concentration in ppm every 2.5 seconds.MicroPython exampleRead the gas concentrationStart the sensor at the module's default address and print the concentration in ppb every 2.5 seconds.MicroPython exampleAverage several readingsTake five readings three seconds apart and print their average in ppb.MicroPython exampleCalibrate the zero pointAdd your own offset to the measured voltage so the reading sits at zero in clean air.MicroPython exampleUse your own sensor configurationBuild a SensorConfig with your own sensitivity, ADC range and front-end settings.MicroPython exampleRead two sensors on one busCreate two sensors at two addresses and print both readings in ppb.