![]() |
Qwiic_ENS160_Py
2.0.0-3-gba26a9b
Python for SFE Qwiic ENS160
|
Public Member Functions | |
| def | __init__ (self, address=None, i2c_driver=None) |
| Constructor. More... | |
| def | is_connected (self) |
| Determines if this device is connected. More... | |
| def | begin (self) |
| Initializes this device with default parameters. More... | |
| def | set_operating_mode (self, val) |
| Sets the operating mode: Deep Sleep (0x00), Idle (0x01), Standard (0x02), Reset (0xF0) More... | |
| def | get_operating_mode (self) |
| Gets the current operating mode: Deep Sleep (0x00), Idle (0x01), Standard (0x02), Reset (0xF0) More... | |
| def | get_app_ver (self) |
| Retrieves the 24 bit application version of the device. More... | |
| def | get_unique_id (self) |
| Retrieves the 16 bit id of the device. More... | |
| def | configure_interrupt (self, val) |
| Changes all of the settings within the interrupt configuration register. More... | |
| def | enable_interrupt (self, enable=True) |
| Enables the interrupt. More... | |
| def | set_interrupt_polarity (self, activeHigh=True) |
| Changes the polarity of the interrupt: active high or active low. More... | |
| def | get_interrupt_polarity (self) |
| Retrieves the Retrieves the polarity of the physical interrupt. More... | |
| def | set_interrupt_drive (self, pushPull=True) |
| Changes the pin drive of the interrupt: open drain (default) to push/pull. More... | |
| def | set_data_interrupt (self, enable) |
| Routes the data ready signal to the interrupt pin. More... | |
| def | set_gpr_interrupt (self, enable) |
| Routes the general purporse read register signal to the interrupt pin. More... | |
| def | set_temp_compensation (self, tempKelvin) |
| The ENS160 can use temperature data to help give more accurate sensor data. More... | |
| def | set_temp_compensation_celsius (self, tempCelsius) |
| The ENS160 can use temperature data to help give more accurate sensor data. More... | |
| def | set_rh_compensation (self, humidity) |
| The ENS160 can use relative Humidiy data to help give more accurate sensor data. More... | |
| def | check_data_status (self) |
| This checks the if the NEWDAT bit is high indicating that new data is ready to be read. More... | |
| def | check_gpr_status (self) |
| This checks the if the NEWGPR bit is high indicating that there is data in the general purpose read registers. More... | |
| def | get_flags (self) |
| This checks the status "flags" of the device (0-3). More... | |
| def | check_operation_status (self) |
| Checks the bit that indicates if an operation mode is running i.e. More... | |
| def | get_operation_error (self) |
| Checks the bit that indicates if an invalid operating mode has been selected. More... | |
| def | get_aqi (self) |
| This reports the calculated Air Quality Index according to UBA which is a value between 1-5. More... | |
| def | get_tvoc (self) |
| This reports the Total Volatile Organic Compounds in ppb (parts per billion) More... | |
| def | get_etoh (self) |
| This reports the ehtanol concentration in ppb (parts per billion). More... | |
| def | get_eco2 (self) |
| This reports the CO2 concentration in ppm (parts per million) based on the detected VOCs and hydrogen. More... | |
| def | get_temp_kelvin (self) |
| This reports the temperature compensation value given to the sensor in Kelvin. More... | |
| def | get_temp_celsius (self) |
| This reports the temperature compensation value given to the sensor in Celsius. More... | |
| def | get_rh (self) |
| This reports the relative humidity compensation value given to the sensor. More... | |
| def | get_raw_resistance (self) |
| For certain gases the raw resistance values of the hot plates can be used for post processing. More... | |
Public Attributes | |
| address | |
Properties | |
| connected = property(is_connected) | |
| def qwiic_ens160.QwiicENS160.__init__ | ( | self, | |
address = None, |
|||
i2c_driver = None |
|||
| ) |
Constructor.
| int,optional | address: The I2C address to use for the device If not provided, the default address is used |
| I2CDriver,optional | i2c_driver: An existing i2c driver object If not provided, a driver object is created |
| def qwiic_ens160.QwiicENS160.begin | ( | self | ) |
Initializes this device with default parameters.
True if successful, otherwise False | def qwiic_ens160.QwiicENS160.check_data_status | ( | self | ) |
This checks the if the NEWDAT bit is high indicating that new data is ready to be read.
The bit is cleared when data has been read from their registers.
| def qwiic_ens160.QwiicENS160.check_gpr_status | ( | self | ) |
This checks the if the NEWGPR bit is high indicating that there is data in the general purpose read registers.
The bit is cleared the relevant registers have been read.
| def qwiic_ens160.QwiicENS160.check_operation_status | ( | self | ) |
Checks the bit that indicates if an operation mode is running i.e.
the device is not off.
| def qwiic_ens160.QwiicENS160.configure_interrupt | ( | self, | |
| val | |||
| ) |
Changes all of the settings within the interrupt configuration register.
| int | val: The desired configuration settings. |
| def qwiic_ens160.QwiicENS160.enable_interrupt | ( | self, | |
enable = True |
|||
| ) |
Enables the interrupt.
| bool | enable: Turns on or off the interrupt |
| def qwiic_ens160.QwiicENS160.get_app_ver | ( | self | ) |
Retrieves the 24 bit application version of the device.
| def qwiic_ens160.QwiicENS160.get_aqi | ( | self | ) |
This reports the calculated Air Quality Index according to UBA which is a value between 1-5.
The AQI-UBA is a guideline developed by the German Federal Environmental Agency and is widely referenced and adopted by many countries and organizations.
1 - Excellent, 2 - Good, 3 - Moderate, 4 - Poor, 5 - Unhealthy.
| def qwiic_ens160.QwiicENS160.get_eco2 | ( | self | ) |
This reports the CO2 concentration in ppm (parts per million) based on the detected VOCs and hydrogen.
| def qwiic_ens160.QwiicENS160.get_etoh | ( | self | ) |
This reports the ehtanol concentration in ppb (parts per billion).
According to the datasheet this is a "virtual mirror" of the ethanol-calibrated TVOC register, which is why they share the same register.
| def qwiic_ens160.QwiicENS160.get_flags | ( | self | ) |
This checks the status "flags" of the device (0-3).
| def qwiic_ens160.QwiicENS160.get_interrupt_polarity | ( | self | ) |
Retrieves the Retrieves the polarity of the physical interrupt.
| def qwiic_ens160.QwiicENS160.get_operating_mode | ( | self | ) |
Gets the current operating mode: Deep Sleep (0x00), Idle (0x01), Standard (0x02), Reset (0xF0)
| def qwiic_ens160.QwiicENS160.get_operation_error | ( | self | ) |
Checks the bit that indicates if an invalid operating mode has been selected.
| def qwiic_ens160.QwiicENS160.get_raw_resistance | ( | self | ) |
For certain gases the raw resistance values of the hot plates can be used for post processing.
More information can be found within the datasheet.
| def qwiic_ens160.QwiicENS160.get_rh | ( | self | ) |
This reports the relative humidity compensation value given to the sensor.
| def qwiic_ens160.QwiicENS160.get_temp_celsius | ( | self | ) |
This reports the temperature compensation value given to the sensor in Celsius.
| def qwiic_ens160.QwiicENS160.get_temp_kelvin | ( | self | ) |
This reports the temperature compensation value given to the sensor in Kelvin.
| def qwiic_ens160.QwiicENS160.get_tvoc | ( | self | ) |
This reports the Total Volatile Organic Compounds in ppb (parts per billion)
| def qwiic_ens160.QwiicENS160.get_unique_id | ( | self | ) |
Retrieves the 16 bit id of the device.
| def qwiic_ens160.QwiicENS160.is_connected | ( | self | ) |
Determines if this device is connected.
True if connected, otherwise False | def qwiic_ens160.QwiicENS160.set_data_interrupt | ( | self, | |
| enable | |||
| ) |
Routes the data ready signal to the interrupt pin.
| bool | enable: enables or disables data ready on |
| def qwiic_ens160.QwiicENS160.set_gpr_interrupt | ( | self, | |
| enable | |||
| ) |
Routes the general purporse read register signal to the interrupt pin.
| bool | enable: whether to turn on or off general purpose read |
| def qwiic_ens160.QwiicENS160.set_interrupt_drive | ( | self, | |
pushPull = True |
|||
| ) |
Changes the pin drive of the interrupt: open drain (default) to push/pull.
| bool | pushPull: Changes the drive of the pin. |
| def qwiic_ens160.QwiicENS160.set_interrupt_polarity | ( | self, | |
activeHigh = True |
|||
| ) |
Changes the polarity of the interrupt: active high or active low.
By default this value is set to zero or active low.
| bool | activeHigh: Changes active state of interrupt from high to low. |
| def qwiic_ens160.QwiicENS160.set_operating_mode | ( | self, | |
| val | |||
| ) |
Sets the operating mode: Deep Sleep (0x00), Idle (0x01), Standard (0x02), Reset (0xF0)
| int | val: The desired operating mode to set |
| def qwiic_ens160.QwiicENS160.set_rh_compensation | ( | self, | |
| humidity | |||
| ) |
The ENS160 can use relative Humidiy data to help give more accurate sensor data.
| float | humidity: The given relative humidity |
| def qwiic_ens160.QwiicENS160.set_temp_compensation | ( | self, | |
| tempKelvin | |||
| ) |
The ENS160 can use temperature data to help give more accurate sensor data.
| float | tempKelvin: The given temperature in Kelvin |
| def qwiic_ens160.QwiicENS160.set_temp_compensation_celsius | ( | self, | |
| tempCelsius | |||
| ) |
The ENS160 can use temperature data to help give more accurate sensor data.
| float | tempCelsius: The given temperature in Celsius |
| qwiic_ens160.QwiicENS160.address |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |