AGS02MA¶
ags02ma¶
MicroPython Driver for the AGS02MA TVOC sensor
Author(s): ladyada, Jose D. Montoya
-
class micropython_ags02ma.ags02ma.AGS02MA(i2c, address: int =
0x1A)[source]¶ Driver for the AGS02MA Sensor connected over I2C.
- Parameters¶
- Raises¶
RuntimeError – if the sensor is not found
Quickstart: Importing and using the device
Here is an example of using the
AGS02MAclass. First you will need to import the libraries to use the sensorfrom machine import Pin, I2C import ags02maOnce this is done you can define your
machine.I2Cobject and define your sensor objecti2c = I2C(sda=Pin28), scl=Pin(3)) ags02ma = ags02ma.AGS02MA(i2c)Now you have access to the attributes