ens160.driver
ENS160 I2C driver
ENS160 Sensor class.
Constructor for the class which takes an ens160.ICommunication
object
to provide the communications.
This project provides two retry_i2c.SMBusRetryingI2C and ens160.mock.MockENS160. The first can be used to communicate with a real ENS160 via an I2C link.
The ENS160 can be configured to use I2C addresses 0x52 or 0x53.
Sets the ENS160 operation mode. Returns True on success.
Note that get_part_id and get_fw_version will only work in OpModes.IDLE.
Gets the part id.
Expecting 0x0160. Note that this only works in OpModes.IDLE.
Returns a string of firmware version in Major.Minor.Release format.
For example: 5.4.6.
Sets the compensation temperature. The sensor will adjust the measurement outputs based on these values.
Note: set temperature and humidity compensation values before reading data, otherwise you get zeros.
Sets the compensation temperature. The sensor will adjust the measurement outputs based on these values.
Note: set temperature and humidity compensation values before reading data, otherwise you get zeros.
Sets the compensation temperature. The sensor will adjust the measurement outputs based on these values.
Note: set temperature and humidity compensation values before reading data, otherwise you get zeros.
Sets the compensation humidity. The sensor will adjust the measurement outputs based on these values.
Note: set temperature and humidity compensation values before reading data, otherwise you get zeros.
Get the Air Quality index.
Possible value are 1,2,3,4 or 5. With 1 being great and 5 being worst.
Get the Total Volatile Organic compounds in the air in ppb. Lower is better air quality.
Get the eCO2 levels in the air in ppm.
Range | Unit | Quality | Description |
---|---|---|---|
0 - 600 | ppm | Excellent | Target |
600 - 800 | ppm | Good | Average |
800 - 1000 | ppm | Fair | Optional Ventilation |
1000 - 1500 | ppm | Poor | Contaminated indoor air, ventilation recommend. |
1500 + | ppm | Bad | Heavily contaminated indoor air, ventilation required. |