adafruit_ens160

CircuitPython / Python library for ScioSense ENS160 digital multi-gas sensor

  • Author(s): ladyada

Implementation Notes

Hardware:

Software and Dependencies:

class adafruit_ens160.ENS160(i2c_bus: I2C, address: int = 83)

Driver for the ENS160 air quality sensor

Parameters:
  • i2c_bus (I2C) – The I2C bus the ENS160 is connected to.

  • address (int) – The I2C device address. Defaults to 0x53

clear_command() None

Clears out custom data

property firmware_version: str

Read the semver firmware version from the general registers

property humidity_compensation: float

Humidity compensation setting, set this to ambient relative humidity (percentage 0-100) to get best gas sensor readings

property mode: Literal[0, 1, 2, 240]

Operational Mode, can be MODE_SLEEP, MODE_IDLE, MODE_STANDARD, or MODE_RESET

property new_data_available: bool

This function is wierd, it checks if there’s new data or GPR (resistances) and if so immediately reads it into the internal buffer… otherwise the status is lost!

read_all_sensors() Dict[str, int | List[int] | None]

All of the currently buffered sensor information

reset() None

Perform a soft reset command

property temperature_compensation: float

Temperature compensation setting, set this to ambient temperature to get best gas sensor readings, floating point degrees C