API Documentation
SFA3X
Sfa3xDevice
The class Sfa3xDeviceBase implements the low level interface of the sensor. The class Sfa3xDevice extends the Sfa3xDeviceBase. It provides additional functions to ease the use of the sensor.
- class sensirion_i2c_sfa3x.device.Sfa3xDeviceBase(channel)[source]
Low level API implementation of SFA3X
- property channel
- start_continuous_measurement()[source]
Starts the continuous measurement. After power-up, the sensor module is in idle-mode. Before any measurement values can be read, the measurement mode needs to be started using this command. Only available in idle mode, i.e. when no measurement is running. If a measurement is already running, stop it first with the stop_measurement command.
- stop_measurement()[source]
Stops the continuous measurement and returns to idle mode. This command is only available in measurement mode. Returns error 67 (hex 0x43) if no measurement is running.
- read_measured_values_as_integers()[source]
Reads the measured values from the module. The sensor will always return the latest available measurement. If a read measured value command is issued before a new measurement is available, the last available measurement will be sent again in the reply. Before the first sensor reading is available after starting the continuous measurement, the sensor returns an empty frame and error code 32 (hex 0x20).
- Return hcho:
Formaldehyde concentration in ppb with a scaling of 5.
- Return humidity:
Relative humidity in %RH with a scaling of 100.
- Return temperature:
Temperature in degrees Celsius with a scaling of 200.
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_sfa3x.commands.StartContinuousMeasurement[source]
Starts the continuous measurement. After power-up, the sensor module is in idle-mode. Before any measurement values can be read, the measurement mode needs to be started using this command. Only available in idle mode, i.e. when no measurement is running. If a measurement is already running, stop it first with the stop_measurement command.
- CMD_ID = 6
- tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
- class sensirion_i2c_sfa3x.commands.StopMeasurement[source]
Stops the continuous measurement and returns to idle mode. This command is only available in measurement mode. Returns error 67 (hex 0x43) if no measurement is running.
- CMD_ID = 260
- tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
- class sensirion_i2c_sfa3x.commands.ReadMeasuredValuesAsIntegers[source]
Reads the measured values from the module. The sensor will always return the latest available measurement. If a read measured value command is issued before a new measurement is available, the last available measurement will be sent again in the reply. Before the first sensor reading is available after starting the continuous measurement, the sensor returns an empty frame and error code 32 (hex 0x20).
- CMD_ID = 807
- tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
- rx = <sensirion_driver_adapters.rx_tx_data.RxData 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.
- class sensirion_i2c_sfa3x.result_types.SignalHcho(hcho_raw)[source]
Measured formaldehyde concentration in ppb.
- property value