API Documentation
SCD4X
Scd4xDevice
The class Scd4xDeviceBase implements the low level interface of the sensor. The class Scd4xDevice extends the Scd4xDeviceBase. It provides additional functions to ease the use of the sensor.
- class sensirion_i2c_scd4x.device.Scd4xDeviceBase(channel)[source]
Low level API implementation of SCD4X
- property channel
- start_periodic_measurement()[source]
Starts the periodic measurement mode. The signal update interval is 5 seconds.
Note
This command is only available in idle mode.
- read_measurement_raw()[source]
Reads the sensor output. The measurement data can only be read out once per signal update interval as the buffer is emptied upon read-out. If no data is available in the buffer, the sensor returns a NACK. To avoid a NACK response, the get_data_ready_status can be issued to check data status. The I2C master can abort the read transfer with a NACK followed by a STOP condition after any data byte if the user is not interested in subsequent data.
- Return co2_concentration:
CO₂ concentration in ppm
- Return temperature:
Convert to degrees celsius by (175 * value / 65535) - 45
- Return relative_humidity:
Convert to relative humidity in % by (100 * value / 65535)
- stop_periodic_measurement()[source]
Command returns a sensor running in periodic measurement mode or low power periodic measurement mode back to the idle state, e.g. to then allow changing the sensor configuration or to save power.
- set_temperature_offset_raw(offset_temperature)[source]
Setting the temperature offset of the SCD4x inside the customer device allows the user to optimize the RH and T output signal. The temperature offset can depend on several factors such as the SCD4x measurement mode, self-heating of close components, the ambient temperature and air flow. Thus, the SCD4x temperature offset should be determined after integration into the final device and under its typical operating conditions (including the operation mode to be used in the application) in thermal equilibrium. By default, the temperature offset is set to 4 °C. To save the setting to the EEPROM, the persist_settings command may be issued. Equation (1) details how the characteristic temperature offset can be calculated using the current temperature output of the sensor (TSCD4x), a reference temperature value (TReference), and the previous temperature offset (Toffset_pervious) obtained using the get_temperature_offset_raw command:
Toffset_actual = TSCD4x - TReference + Toffset_pervious.
Recommended temperature offset values are between 0 °C and 20 °C. The temperature offset does not impact the accuracy of the CO2 output.
- Parameters:
offset_temperature – Temperature offset. Convert Toffset in °C to value by: (Toffset * 65535 / 175)
Note
This command is only available in idle mode.
- Example:
sensor.set_temperature_offset_raw(1498)
- get_temperature_offset_raw()[source]
Get the raw temperature compensation offset used by the sensor.
- Return offset_temperature:
Convert to °C by (175 * value / 65535)
Note
This command is only available in idle mode.
- set_sensor_altitude(sensor_altitude)[source]
Typically, the sensor altitude is set once after device installation. To save the setting to the EEPROM, the persist_settings command must be issued. The default sensor altitude value is set to 0 meters above sea level. Note that setting a sensor altitude to the sensor overrides any pressure compensation based on a previously set ambient pressure.
- Parameters:
sensor_altitude – Sensor altitude in meters above sea level. Valid input values are between 0 - 3000 m.
Note
This command is only available in idle mode.
- Example:
sensor.set_sensor_altitude(0)
- get_sensor_altitude()[source]
Get the sensor altitude used by the sensor.
- Return sensor_altitude:
Sensor altitude used by the sensor in meters above sea level.
Note
This command is only available in idle mode.
- set_ambient_pressure_raw(ambient_pressure)[source]
The set_ambient_pressure command can be sent during periodic measurements to enable continuous pressure compensation. Note that setting an ambient pressure overrides any pressure compensation based on a previously set sensor altitude. Use of this command is highly recommended for applications experiencing significant ambient pressure changes to ensure sensor accuracy. Valid input values are between 70000 - 120000 Pa. The default value is 101300 Pa.
- Parameters:
ambient_pressure – Convert ambient_pressure in hPa to Pa by ambient_pressure / 100.
Note
Available during measurements.
- Example:
sensor.set_ambient_pressure_raw(1013)
- get_ambient_pressure_raw()[source]
Get the ambient pressure around the sensor.
- Return ambient_pressure:
Convert to Pa by value = ambient_pressure * 100.
- perform_forced_recalibration(target_CO2_concentration)[source]
To successfully conduct an accurate FRC, the following steps need to be carried out:
1. Operate the SCD4x in the operation mode later used for normal sensor operation (e.g. periodic measurement) for at least 3 minutes in an environment with a homogenous and constant CO2 concentration. The sensor must be operated at the voltage desired for the application when performing the FRC sequence. 2. Issue the stop_periodic_measurement command. 3. Issue the perform_forced_recalibration command.
A return value of 0xffff indicates that the FRC has failed because the sensor was not operated before sending the command.
- Parameters:
target_co2_concentration – Target CO₂ concentration in ppm CO₂.
- Return frc_correction:
Convert to FRC correction in ppm CO₂ by frc_correction - 0x8000. A return value of 0xFFFF indicates that the FRC has failed because the sensor was not operated before sending the command.
Note
This command is only available in idle mode.
- set_automatic_self_calibration_enabled(asc_enabled)[source]
Sets the current state (enabled / disabled) of the ASC. By default, ASC is enabled. To save the setting to the EEPROM, the persist_settings command must be issued. The ASC enables excellent long-term stability of SCD4x without the need for regular user intervention. The algorithm leverages the sensor’s measurement history and the assumption of exposure of the sensor to a known minimum background CO₂ concentration at least once over a period of cumulative operation. By default, the ASC algorithm assumes that the sensor is exposed to outdoor fresh air at 400 ppm CO₂ concentration at least once per week of accumulated operation using one of the following measurement modes for at least 4 hours without interruption at a time: periodic measurement mode, low power periodic measurement mode or single shot mode with a measurement interval of 5 minutes (SCD41 only).
- Parameters:
asc_enabled – 1 enables ASC, 0 disables ASC.
Note
This command is only available in idle mode.
- Example:
sensor.set_automatic_self_calibration_enabled(1)
- get_automatic_self_calibration_enabled()[source]
Check if automatic self calibration (ASC) is enabled.
- Return asc_enabled:
1 if ASC is enabled, 0 if ASC is disabled.
Note
This command is only available in idle mode.
- set_automatic_self_calibration_target(asc_target)[source]
Sets the value of the ASC baseline target, i.e. the CO₂ concentration in ppm which the ASC algorithm will assume as lower-bound background to which the SCD4x is exposed to regularly within one ASC period of operation. To save the setting to the EEPROM, the persist_settings command must be issued subsequently. The factory default value is 400 ppm.
- Parameters:
asc_target – ASC baseline value in ppm CO₂
Note
This command is only available in idle mode.
- Example:
sensor.set_automatic_self_calibration_target(400)
- get_automatic_self_calibration_target()[source]
Reads out the ASC baseline target concentration parameter.
- Return asc_target:
ASC baseline target concentration parameter in ppm CO₂.
Note
This command is only available in idle mode.
- start_low_power_periodic_measurement()[source]
To enable use-cases with a constrained power budget, the SCD4x features a low power periodic measurement mode with a signal update interval of approximately 30 seconds. The low power periodic measurement mode is initiated using the start_low_power_periodic_measurement command and read-out in a similar manner as the periodic measurement mode using the read_measurement command. To periodically check whether a new measurement result is available for read out, the get_data_ready_status command can be used to synchronize to the sensor’s internal measurement interval as an alternative to relying on the ACK/NACK status of the read_measurement_command.
- get_data_ready_status_raw()[source]
Polls the sensor for whether data from a periodic or single shot measurement is ready to be read out.
- Return data_ready_status:
If one or more of the 11 least significant bits are 1, then the data is ready.
- persist_settings()[source]
Configuration settings such as the temperature offset, sensor altitude and the ASC enabled/disabled parameters are by default stored in the volatile memory (RAM) only. The persist_settings command stores the current configuration in the EEPROM of the SCD4x, ensuring the current settings persist after power-cycling. To avoid unnecessary wear of the EEPROM, the persist_settings command should only be sent following configuration changes whose persistence is required. The EEPROM is guaranteed to withstand at least 2000 write cycles. Note that field calibration history (i.e. FRC and ASC) is automatically stored in a separate EEPROM dimensioned for the specified sensor lifetime when operated continuously in either periodic measurement mode, low power periodic measurement mode or single shot mode with 5 minute measurement interval (SCD41 only).
Note
This command is only available in idle mode.
- get_serial_number()[source]
Reading out the serial number can be used to identify the chip and to verify the presence of the sensor. The get_serial_number command returns 3 words, and every word is followed by an 8-bit CRC checksum. Together, the 3 words constitute a unique serial number with a length of 48 bits (in big endian format).
- Return serial_number:
48-bit unique serial number of the sensor.
Note
This command is only available in idle mode.
- perform_self_test()[source]
Can be used as an end-of-line test to check the sensor functionality.
- Return sensor_status:
If sensor status is equal to 0, no malfunction has been detected.
Note
This command is only available in idle mode.
- perform_factory_reset()[source]
The perform_factory_reset command resets all configuration settings stored in the EEPROM and erases the FRC and ASC algorithm history.
Note
This command is only available in idle mode.
- reinit()[source]
The reinit command reinitialize the sensor by reloading user settings from EEPROM. The sensor must be in the idle state before sending the reinit command. If the reinit command does not trigger the desired re-initialization, a power-cycle should be applied to the SCD4x.
Note
This command is only available in idle mode.
- get_sensor_variant_raw()[source]
Reads out the SCD4x sensor variant.
- Return sensor_variant:
Bits[15…12] = 0000 → SCD40 Bits[15…12] = 0001 → SCD41
Note
This command is only available in idle mode.
- measure_single_shot()[source]
The sensor output is read out by using the read_measurement command. The fastest possible sampling interval for single shot measurements is 5 seconds. The ASC is enabled by default in single shot operation and optimized for single shot measurements performed every 5 minutes. For more details about single shot measurements and optimization of power consumption please refer to the datasheet.
Note
This command is only available for SCD41.
- measure_single_shot_rht_only()[source]
For more details about single shot measurements and optimization of power consumption please refer to the datasheet.
Note
This command is only available for SCD41.
- power_down()[source]
Put the sensor from idle to sleep to reduce power consumption. Can be used to power down when operating the sensor in power-cycled single shot mode.
Note
This command is only available in idle mode. Only for SCD41.
- wake_up()[source]
Wake up the sensor from sleep mode into idle mode. Note that the SCD4x does not acknowledge the wake_up command. The sensor’s idle state after wake up can be verified by reading out the serial number.
Note
This command is only available for SCD41.
- set_automatic_self_calibration_initial_period(asc_initial_period)[source]
Sets the duration of the initial period for ASC correction (in hours). By default, the initial period for ASC correction is 44 hours. Allowed values are integer multiples of 4 hours. A value of 0 results in an immediate correction. To save the setting to the EEPROM, the persist_settings command must be issued.
For single shot operation, this parameter always assumes a measurement interval of 5 minutes, counting the number of single shots to calculate elapsed time. If single shot measurements are taken more / less frequently than once every 5 minutes, this parameter must be scaled accordingly to achieve the intended period in hours (e.g. for a 10-minute measurement interval, the scaled parameter value is obtained by multiplying the intended period in hours by 0.5).
- Parameters:
asc_initial_period – ASC initial period in hours
Note
This command is available for SCD41 and only in idle mode.
- Example:
sensor.set_automatic_self_calibration_initial_period(44)
- get_automatic_self_calibration_initial_period()[source]
Read out the initial period for ASC correction
- Return asc_initial_period:
ASC initial period in hours
Note
This command is only available for SCD41 and only in idle mode.
- set_automatic_self_calibration_standard_period(asc_standard_period)[source]
Sets the standard period for ASC correction (in hours). By default, the standard period for ASC correction is 156 hours. Allowed values are integer multiples of 4 hours. Note: a value of 0 results in an immediate correction. To save the setting to the EEPROM, the persist_settings (see Section 3.10.1) command must be issued.
For single shot operation, this parameter always assumes a measurement interval of 5 minutes, counting the number of single shots to calculate elapsed time. If single shot measurements are taken more / less frequently than once every 5 minutes, this parameter must be scaled accordingly to achieve the intended period in hours (e.g. for a 10-minute measurement interval, the scaled parameter value is obtained by multiplying the intended period in hours by 0.5).
- Parameters:
asc_standard_period – ASC standard period in hours
Note
This command is only available for SCD41 and only in idle mode.
- Example:
sensor.set_automatic_self_calibration_standard_period(156)
- class sensirion_i2c_scd4x.device.Scd4xDevice(channel)[source]
Driver class implementation of SCD4X
- scd4x
Access to base class
- read_measurement()[source]
Reads the sensor output. The measurement data can only be read out once per signal update interval as the buffer is emptied upon read-out. If no data is available in the buffer, the sensor returns a NACK. To avoid a NACK response, the get_data_ready_status can be issued to check data status. The I2C master can abort the read transfer with a NACK followed by a STOP condition after any data byte if the user is not interested in subsequent data.
- Return a_co2_concentration:
CO₂ concentration in ppm
- Return a_temperature:
Temperature in °C
- Return a_relative_humidity:
Relative humidity in %RH
- set_temperature_offset(temperature_offset)[source]
Setting the temperature offset of the SCD4x inside the customer device allows the user to optimize the RH and T output signal. The temperature offset can depend on several factors such as the SCD4x measurement mode, self-heating of close components, the ambient temperature and air flow. Thus, the SCD4x temperature offset should be determined after integration into the final device and under its typical operating conditions (including the operation mode to be used in the application) in thermal equilibrium. By default, the temperature offset is set to 4 °C. To save the setting to the EEPROM, the persist_settings command may be issued. Equation (1) details how the characteristic temperature offset can be calculated using the current temperature output of the sensor (TSCD4x), a reference temperature value (TReference), and the previous temperature offset (Toffset_pervious) obtained using the get_temperature_offset_raw command:
Toffset_actual = TSCD4x - TReference + Toffset_pervious.
Recommended temperature offset values are between 0 °C and 20 °C. The temperature offset does not impact the accuracy of the CO2 output.
- Parameters:
temperature_offset – Temperature offset value in °C
Note
This command is only available in idle mode.
- get_temperature_offset()[source]
Get the temperature compensation offset used by the sensor in °C.
- Return a_temperature_offset:
Temperature in °C
Note
This command is only available in idle mode.
- set_ambient_pressure(ambient_pressure)[source]
The set_ambient_pressure command can be sent during periodic measurements to enable continuous pressure compensation. Note that setting an ambient pressure overrides any pressure compensation based on a previously set sensor altitude. Use of this command is highly recommended for applications experiencing significant ambient pressure changes to ensure sensor accuracy. Valid input values are between 70000 - 120000 Pa. The default value is 101300 Pa.
- Parameters:
ambient_pressure – Ambient pressure around the sensor in Pa
- get_ambient_pressure()[source]
Get the ambient pressure around the sensor.
- Return a_ambient_pressure:
Pressure in Pa
- get_data_ready_status()[source]
Polls the sensor for whether data from a periodic or single shot measurement is ready to be read out.
- Return arg_0:
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_scd4x.commands.StartPeriodicMeasurement[source]
Starts the periodic measurement mode. The signal update interval is 5 seconds.
- CMD_ID = 8625
- tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
- class sensirion_i2c_scd4x.commands.ReadMeasurementRaw[source]
Reads the sensor output. The measurement data can only be read out once per signal update interval as the buffer is emptied upon read-out. If no data is available in the buffer, the sensor returns a NACK. To avoid a NACK response, the get_data_ready_status can be issued to check data status. The I2C master can abort the read transfer with a NACK followed by a STOP condition after any data byte if the user is not interested in subsequent data.
- CMD_ID = 60421
- tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
- rx = <sensirion_driver_adapters.rx_tx_data.RxData object>
- class sensirion_i2c_scd4x.commands.StopPeriodicMeasurement[source]
Command returns a sensor running in periodic measurement mode or low power periodic measurement mode back to the idle state, e.g. to then allow changing the sensor configuration or to save power.
- CMD_ID = 16262
- tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
- class sensirion_i2c_scd4x.commands.SetTemperatureOffsetRaw(offset_temperature)[source]
Setting the temperature offset of the SCD4x inside the customer device allows the user to optimize the RH and T output signal. The temperature offset can depend on several factors such as the SCD4x measurement mode, self-heating of close components, the ambient temperature and air flow. Thus, the SCD4x temperature offset should be determined after integration into the final device and under its typical operating conditions (including the operation mode to be used in the application) in thermal equilibrium. By default, the temperature offset is set to 4 °C. To save the setting to the EEPROM, the persist_settings command may be issued. Equation (1) details how the characteristic temperature offset can be calculated using the current temperature output of the sensor (TSCD4x), a reference temperature value (TReference), and the previous temperature offset (Toffset_pervious) obtained using the get_temperature_offset_raw command:
Toffset_actual = TSCD4x - TReference + Toffset_pervious.
Recommended temperature offset values are between 0 °C and 20 °C. The temperature offset does not impact the accuracy of the CO2 output.
- CMD_ID = 9245
- tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
- class sensirion_i2c_scd4x.commands.GetTemperatureOffsetRaw[source]
Get the raw temperature compensation offset used by the sensor.
- CMD_ID = 8984
- tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
- rx = <sensirion_driver_adapters.rx_tx_data.RxData object>
- class sensirion_i2c_scd4x.commands.SetSensorAltitude(sensor_altitude)[source]
Typically, the sensor altitude is set once after device installation. To save the setting to the EEPROM, the persist_settings command must be issued. The default sensor altitude value is set to 0 meters above sea level. Note that setting a sensor altitude to the sensor overrides any pressure compensation based on a previously set ambient pressure.
- CMD_ID = 9255
- tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
- class sensirion_i2c_scd4x.commands.GetSensorAltitude[source]
Get the sensor altitude used by the sensor.
- CMD_ID = 8994
- tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
- rx = <sensirion_driver_adapters.rx_tx_data.RxData object>
- class sensirion_i2c_scd4x.commands.SetAmbientPressureRaw(ambient_pressure)[source]
The set_ambient_pressure command can be sent during periodic measurements to enable continuous pressure compensation. Note that setting an ambient pressure overrides any pressure compensation based on a previously set sensor altitude. Use of this command is highly recommended for applications experiencing significant ambient pressure changes to ensure sensor accuracy. Valid input values are between 70000 - 120000 Pa. The default value is 101300 Pa.
- CMD_ID = 57344
- tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
- class sensirion_i2c_scd4x.commands.GetAmbientPressureRaw[source]
Get the ambient pressure around the sensor.
- CMD_ID = 57344
- tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
- rx = <sensirion_driver_adapters.rx_tx_data.RxData object>
- class sensirion_i2c_scd4x.commands.PerformForcedRecalibration(target_CO2_concentration)[source]
To successfully conduct an accurate FRC, the following steps need to be carried out:
1. Operate the SCD4x in the operation mode later used for normal sensor operation (e.g. periodic measurement) for at least 3 minutes in an environment with a homogenous and constant CO2 concentration. The sensor must be operated at the voltage desired for the application when performing the FRC sequence. 2. Issue the stop_periodic_measurement command. 3. Issue the perform_forced_recalibration command.
A return value of 0xffff indicates that the FRC has failed because the sensor was not operated before sending the command.
- CMD_ID = 13871
- tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
- rx = <sensirion_driver_adapters.rx_tx_data.RxData object>
- class sensirion_i2c_scd4x.commands.SetAutomaticSelfCalibrationEnabled(asc_enabled)[source]
Sets the current state (enabled / disabled) of the ASC. By default, ASC is enabled. To save the setting to the EEPROM, the persist_settings command must be issued. The ASC enables excellent long-term stability of SCD4x without the need for regular user intervention. The algorithm leverages the sensor’s measurement history and the assumption of exposure of the sensor to a known minimum background CO₂ concentration at least once over a period of cumulative operation. By default, the ASC algorithm assumes that the sensor is exposed to outdoor fresh air at 400 ppm CO₂ concentration at least once per week of accumulated operation using one of the following measurement modes for at least 4 hours without interruption at a time: periodic measurement mode, low power periodic measurement mode or single shot mode with a measurement interval of 5 minutes (SCD41 only).
- CMD_ID = 9238
- tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
- class sensirion_i2c_scd4x.commands.GetAutomaticSelfCalibrationEnabled[source]
Check if automatic self calibration (ASC) is enabled.
- CMD_ID = 8979
- tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
- rx = <sensirion_driver_adapters.rx_tx_data.RxData object>
- class sensirion_i2c_scd4x.commands.SetAutomaticSelfCalibrationTarget(asc_target)[source]
Sets the value of the ASC baseline target, i.e. the CO₂ concentration in ppm which the ASC algorithm will assume as lower-bound background to which the SCD4x is exposed to regularly within one ASC period of operation. To save the setting to the EEPROM, the persist_settings command must be issued subsequently. The factory default value is 400 ppm.
- CMD_ID = 9274
- tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
- class sensirion_i2c_scd4x.commands.GetAutomaticSelfCalibrationTarget[source]
Reads out the ASC baseline target concentration parameter.
- CMD_ID = 9023
- tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
- rx = <sensirion_driver_adapters.rx_tx_data.RxData object>
- class sensirion_i2c_scd4x.commands.StartLowPowerPeriodicMeasurement[source]
To enable use-cases with a constrained power budget, the SCD4x features a low power periodic measurement mode with a signal update interval of approximately 30 seconds. The low power periodic measurement mode is initiated using the start_low_power_periodic_measurement command and read-out in a similar manner as the periodic measurement mode using the read_measurement command. To periodically check whether a new measurement result is available for read out, the get_data_ready_status command can be used to synchronize to the sensor’s internal measurement interval as an alternative to relying on the ACK/NACK status of the read_measurement_command.
- CMD_ID = 8620
- tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
- class sensirion_i2c_scd4x.commands.GetDataReadyStatusRaw[source]
Polls the sensor for whether data from a periodic or single shot measurement is ready to be read out.
- CMD_ID = 58552
- tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
- rx = <sensirion_driver_adapters.rx_tx_data.RxData object>
- class sensirion_i2c_scd4x.commands.PersistSettings[source]
Configuration settings such as the temperature offset, sensor altitude and the ASC enabled/disabled parameters are by default stored in the volatile memory (RAM) only. The persist_settings command stores the current configuration in the EEPROM of the SCD4x, ensuring the current settings persist after power-cycling. To avoid unnecessary wear of the EEPROM, the persist_settings command should only be sent following configuration changes whose persistence is required. The EEPROM is guaranteed to withstand at least 2000 write cycles. Note that field calibration history (i.e. FRC and ASC) is automatically stored in a separate EEPROM dimensioned for the specified sensor lifetime when operated continuously in either periodic measurement mode, low power periodic measurement mode or single shot mode with 5 minute measurement interval (SCD41 only).
- CMD_ID = 13845
- tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
- class sensirion_i2c_scd4x.commands.GetSerialNumber[source]
Reading out the serial number can be used to identify the chip and to verify the presence of the sensor. The get_serial_number command returns 3 words, and every word is followed by an 8-bit CRC checksum. Together, the 3 words constitute a unique serial number with a length of 48 bits (in big endian format).
- CMD_ID = 13954
- tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
- rx = <sensirion_driver_adapters.rx_tx_data.RxData object>
- class sensirion_i2c_scd4x.commands.PerformSelfTest[source]
Can be used as an end-of-line test to check the sensor functionality.
- CMD_ID = 13881
- tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
- rx = <sensirion_driver_adapters.rx_tx_data.RxData object>
- class sensirion_i2c_scd4x.commands.PerformFactoryReset[source]
The perform_factory_reset command resets all configuration settings stored in the EEPROM and erases the FRC and ASC algorithm history.
- CMD_ID = 13874
- tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
- class sensirion_i2c_scd4x.commands.Reinit[source]
The reinit command reinitialize the sensor by reloading user settings from EEPROM. The sensor must be in the idle state before sending the reinit command. If the reinit command does not trigger the desired re-initialization, a power-cycle should be applied to the SCD4x.
- CMD_ID = 13894
- tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
- class sensirion_i2c_scd4x.commands.GetSensorVariantRaw[source]
Reads out the SCD4x sensor variant.
- CMD_ID = 8239
- tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
- rx = <sensirion_driver_adapters.rx_tx_data.RxData object>
- class sensirion_i2c_scd4x.commands.MeasureSingleShot[source]
The sensor output is read out by using the read_measurement command. The fastest possible sampling interval for single shot measurements is 5 seconds. The ASC is enabled by default in single shot operation and optimized for single shot measurements performed every 5 minutes. For more details about single shot measurements and optimization of power consumption please refer to the datasheet.
- CMD_ID = 8605
- tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
- class sensirion_i2c_scd4x.commands.MeasureSingleShotRhtOnly[source]
For more details about single shot measurements and optimization of power consumption please refer to the datasheet.
- CMD_ID = 8598
- tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
- class sensirion_i2c_scd4x.commands.PowerDown[source]
Put the sensor from idle to sleep to reduce power consumption. Can be used to power down when operating the sensor in power-cycled single shot mode.
- CMD_ID = 14048
- tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
- class sensirion_i2c_scd4x.commands.WakeUp[source]
Wake up the sensor from sleep mode into idle mode. Note that the SCD4x does not acknowledge the wake_up command. The sensor’s idle state after wake up can be verified by reading out the serial number.
- CMD_ID = 14070
- tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
- class sensirion_i2c_scd4x.commands.SetAutomaticSelfCalibrationInitialPeriod(asc_initial_period)[source]
Sets the duration of the initial period for ASC correction (in hours). By default, the initial period for ASC correction is 44 hours. Allowed values are integer multiples of 4 hours. A value of 0 results in an immediate correction. To save the setting to the EEPROM, the persist_settings command must be issued.
For single shot operation, this parameter always assumes a measurement interval of 5 minutes, counting the number of single shots to calculate elapsed time. If single shot measurements are taken more / less frequently than once every 5 minutes, this parameter must be scaled accordingly to achieve the intended period in hours (e.g. for a 10-minute measurement interval, the scaled parameter value is obtained by multiplying the intended period in hours by 0.5).
- CMD_ID = 9285
- tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
- class sensirion_i2c_scd4x.commands.GetAutomaticSelfCalibrationInitialPeriod[source]
Read out the initial period for ASC correction
- CMD_ID = 9024
- tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
- rx = <sensirion_driver_adapters.rx_tx_data.RxData object>
- class sensirion_i2c_scd4x.commands.SetAutomaticSelfCalibrationStandardPeriod(asc_standard_period)[source]
Sets the standard period for ASC correction (in hours). By default, the standard period for ASC correction is 156 hours. Allowed values are integer multiples of 4 hours. Note: a value of 0 results in an immediate correction. To save the setting to the EEPROM, the persist_settings (see Section 3.10.1) command must be issued.
For single shot operation, this parameter always assumes a measurement interval of 5 minutes, counting the number of single shots to calculate elapsed time. If single shot measurements are taken more / less frequently than once every 5 minutes, this parameter must be scaled accordingly to achieve the intended period in hours (e.g. for a 10-minute measurement interval, the scaled parameter value is obtained by multiplying the intended period in hours by 0.5).
- CMD_ID = 9294
- 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.
- class sensirion_i2c_scd4x.result_types.SignalTemperature(raw_temperature)[source]
Temperature in °C
- property value
- class sensirion_i2c_scd4x.result_types.SignalRelativeHumidity(raw_relative_humidity)[source]
Relative humidity in %RH
- property value
- class sensirion_i2c_scd4x.result_types.SignalCo2Concentration(raw_co2_concentration)[source]
CO₂ concentration in ppm
- property value