API Documentation
SGP43
Sgp43Device
The class Sgp43DeviceBase implements the low level interface of the sensor. The class Sgp43Device extends the Sgp43DeviceBase. It provides additional functions to ease the use of the sensor.
- class sensirion_i2c_sgp43.device.Sgp43DeviceBase(channel)[source]
Low level API implementation of SGP43
- property channel
- measure_and_set_temperatures(temperature_px1, temperature_px2, temperature_px3, temperature_px4)[source]
This command measures raw signals of pixel 1-4, then sets the temperatures, and returns the measured raw signals of pixel 1-4.
- Parameters:
temperature_px1 – temperature (in °C) to set on pixel 1
temperature_px2 – temperature (in °C) to set on pixel 2
temperature_px3 – temperature (in °C) to set on pixel 3
temperature_px4 – temperature (in °C) to set on pixel 4
- Return sraw_px1:
measured raw signal of pixel 1
- Return sraw_px2:
measured raw signal of pixel 2
- Return sraw_px3:
measured raw signal of pixel 3
- Return sraw_px4:
measured raw signal of pixel 4
- execute_self_test()[source]
This command triggers the built-in self-test checking for integrity of both hotplate and MOX material and returns the result of this test as 2 bytes
- Return test_result:
0xXX 0xYY: ignore most significant byte 0xXX. The four least significant bits of the least significant byte 0xYY provide information if the self-test has or has not passed for each individual pixel. All zero mean all tests passed successfully. Check the datasheet for more detailed information.
- get_serial_number()[source]
This command provides the decimal serial number of the SGP41 chip by returning 3x2 bytes.
- Return serial_number:
48-bit unique serial number
- turn_heater_off()[source]
This command turns off all hotplates (pixels) immediately, without performing a measurement first. Subsequently, the sensor enters the idle mode. Note that this command can only be sent when the sensor is not executing any other command, it cannot be used to abort a running measurement or self-test.
Commands
The transfer classes specify the data that is transferred between host and sensor. The generated transfer classes are used by the driver class and not intended for direct use.
- class sensirion_i2c_sgp43.commands.MeasureAndSetTemperatures(temperature_px1, temperature_px2, temperature_px3, temperature_px4)[source]
This command measures raw signals of pixel 1-4, then sets the temperatures, and returns the measured raw signals of pixel 1-4.
- CMD_ID = 9802
- tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
- rx = <sensirion_driver_adapters.rx_tx_data.RxData object>
- class sensirion_i2c_sgp43.commands.ExecuteSelfTest[source]
This command triggers the built-in self-test checking for integrity of both hotplate and MOX material and returns the result of this test as 2 bytes
- CMD_ID = 10254
- tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
- rx = <sensirion_driver_adapters.rx_tx_data.RxData object>
- class sensirion_i2c_sgp43.commands.GetSerialNumber[source]
This command provides the decimal serial number of the SGP41 chip by returning 3x2 bytes.
- CMD_ID = 13954
- tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
- rx = <sensirion_driver_adapters.rx_tx_data.RxData object>
- class sensirion_i2c_sgp43.commands.TurnHeaterOff[source]
This command turns off all hotplates (pixels) immediately, without performing a measurement first. Subsequently, the sensor enters the idle mode. Note that this command can only be sent when the sensor is not executing any other command, it cannot be used to abort a running measurement or self-test.
- CMD_ID = 14048
- tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
Result Types
The signal classes specify transformations of the raw sensor signals into a meaningful units. The generated signal types are used by the driver class and not intended for direct use.