pub struct Sen6x<'a, I2C, D> { /* private fields */ }Expand description
Driver for a Sensirion SEN6x air-quality sensor over I²C.
Construct one with Sen6x::new, then drive it through the model-specific
command trait for your sensor (e.g. Sen66Commands / Sen66CommandsAsync).
The driver tracks whether the sensor is idle or measuring and rejects commands
that are not valid in the current state (see the crate-level # Errors docs).
§Thread safety
Sen6x uses core::cell::RefCell for interior mutability, so it is
Send but not Sync. The driver is intended to be owned by a single
task; sharing one instance across threads is not supported. For shared-bus
setups, use the embassy feature, which guards the bus with a Mutex.
Implementations§
Source§impl<'a, C, D> Sen6x<'a, C, D>
impl<'a, C, D> Sen6x<'a, C, D>
Sourcepub fn new<I2C>(i2c: I2C, delay: &'a mut D) -> Selfwhere
I2C: IntoI2cConnection<'a, Connection = C>,
pub fn new<I2C>(i2c: I2C, delay: &'a mut D) -> Selfwhere
I2C: IntoI2cConnection<'a, Connection = C>,
Creates a driver from an I²C bus and a delay provider.
i2c is either an exclusive &mut to an embedded_hal::i2c::I2c /
embedded_hal_async::i2c::I2c implementation, or — with the embassy
feature — a shared &embassy_sync::mutex::Mutex<_, I2C> for buses shared
with other drivers. delay provides the post-command wait each operation
needs. The sensor starts in the idle state.
§Example
use embedded_hal_mock::eh1::i2c::{Mock as I2cMock, Transaction};
use embedded_hal_mock::eh1::delay::NoopDelay;
use sen6x::{Sen6x, Sen66Commands};
// The SEN6x lives at I²C address 0x6B; starting a measurement writes command 0x0021.
let mut i2c = I2cMock::new(&[Transaction::write(0x6B, vec![0x00, 0x21])]);
let mut delay = NoopDelay::new();
let mut sensor = Sen6x::new(&mut i2c, &mut delay);
sensor.start_continuous_measurement()?;
i2c.done(); // all expected I²C traffic happenedTrait Implementations§
Auto Trait Implementations§
impl<'a, I2C, D> !Freeze for Sen6x<'a, I2C, D>
impl<'a, I2C, D> !RefUnwindSafe for Sen6x<'a, I2C, D>
impl<'a, I2C, D> !Sync for Sen6x<'a, I2C, D>
impl<'a, I2C, D> !UnwindSafe for Sen6x<'a, I2C, D>
impl<'a, I2C, D> Send for Sen6x<'a, I2C, D>
impl<'a, I2C, D> Unpin for Sen6x<'a, I2C, D>where
I2C: Unpin,
impl<'a, I2C, D> UnsafeUnpin for Sen6x<'a, I2C, D>where
I2C: UnsafeUnpin,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T, E> Sen62Commands<E> for Twhere
T: Sen6xConnection<Sen62, E>,
impl<T, E> Sen62Commands<E> for Twhere
T: Sen6xConnection<Sen62, E>,
Source§fn start_continuous_measurement(&mut self) -> Result<(), Error<E>>
fn start_continuous_measurement(&mut self) -> Result<(), Error<E>>
Starts a continuous measurement. After starting the measurement, it takes some time (~1.1s) until the first measurement results are available. You could poll with the command Get Data Ready to check when the results are ready to be read.
Note: For SEN63C and SEN69C only: SEN63C and SEN69C are conditioning the CO2 sensor during the initial 24 seconds after starting a measurement. As this process cannot be interrupted, the following limitations apply during this period:
- You may stop the measurement if needed, but do not start it again until at least 24 seconds have passed to avoid a CO2-1 – CO2 Sensor Error.
- Do not stop the sensor and use the commands Perform Forced CO2 Recalibration, Set CO2 Sensor Automatic Self Calibration or Perform CO2 Sensor Factory Reset.
Source§fn stop_measurement(&mut self) -> Result<(), Error<E>>
fn stop_measurement(&mut self) -> Result<(), Error<E>>
Stops the measurement and returns to idle mode.
Source§fn data_ready(&mut self) -> Result<DataReady, Error<E>>
fn data_ready(&mut self) -> Result<DataReady, Error<E>>
This command can be used to check if new measurement results are ready to read. The data_ready flag is automatically reset after reading the measurement values.
Source§fn measured_values(&mut self) -> Result<MeasuredValuesSen62, Error<E>>
fn measured_values(&mut self) -> Result<MeasuredValuesSen62, Error<E>>
Returns the measured values. The command data_ready can be used to check if new data is available since the last read operation. If no new data is available, the previous values will be returned. If no data is available at all (e.g. measurement not running for at least one second), all values will be None
Source§fn raw_values(&mut self) -> Result<RawValuesSen62Sen63c, Error<E>>
fn raw_values(&mut self) -> Result<RawValuesSen62Sen63c, Error<E>>
Returns the measured raw values. The command data_ready can be used to check if new data is available since the last read operation. If no new data is available, the previous values will be returned. If no data is available at all (e.g. measurement not running for at least one second), all values will be None
Source§fn number_concentration_values(
&mut self,
) -> Result<NumberConcentrationValues, Error<E>>
fn number_concentration_values( &mut self, ) -> Result<NumberConcentrationValues, Error<E>>
Returns the measured number concentration values. The command Get Data Ready can be used to check if new data is available since the last read operation. If no new data is available, the previous values will be returned. If no data is available at all (e.g. measurement not running for at least one second), all values will be None
Source§fn set_temperature_offset_parameters(
&mut self,
tx: TemperatureOffsetParameters,
) -> Result<(), Error<E>>
fn set_temperature_offset_parameters( &mut self, tx: TemperatureOffsetParameters, ) -> Result<(), Error<E>>
This command allows to compensate temperature effects of the design-in at customer side by applying custom temperature offsets to the ambient temperature.
Source§fn set_temperature_acceleration_parameters(
&mut self,
tx: TemperatureAccelerationParameters,
) -> Result<(), Error<E>>
fn set_temperature_acceleration_parameters( &mut self, tx: TemperatureAccelerationParameters, ) -> Result<(), Error<E>>
This command allows to set custom temperature acceleration parameters of the RH/T engine. It overwrites the default temperature acceleration parameters of the RH/T engine with custom values.
Source§fn product_name(&mut self) -> Result<FixedStr<32>, Error<E>>
fn product_name(&mut self) -> Result<FixedStr<32>, Error<E>>
Gets the product name from the device
Source§fn serial_number(&mut self) -> Result<FixedStr<32>, Error<E>>
fn serial_number(&mut self) -> Result<FixedStr<32>, Error<E>>
Gets the serial number from the device.
Source§fn device_status(&mut self) -> Result<DeviceStatus, Error<E>>
fn device_status(&mut self) -> Result<DeviceStatus, Error<E>>
Reads the current device status.
Use this command to get detailed information about the device status. The device status is encoded in flags. Each device status flag represents a single bit in a 32-bit integer value. If more than one error is present, the device status register value is the sum of the corresponding flag values. For details about the available flags, refer to the Device Status Register documentation.
Note: The status flags of type “Error” are sticky, i.e. they are not cleared automatically even if the error condition no longer exists. So, they can only be cleared manually with read_and_clear_device_status or through a reset, either by calling Device Reset or through a power cycle. All other flags are not sticky, i.e. they are cleared automatically if the trigger condition disappears
Source§fn read_and_clear_device_status(&mut self) -> Result<DeviceStatus, Error<E>>
fn read_and_clear_device_status(&mut self) -> Result<DeviceStatus, Error<E>>
Reads the current device status (like command Read device_status) and afterwards clears all flags
Source§fn version(&mut self) -> Result<Version, Error<E>>
fn version(&mut self) -> Result<Version, Error<E>>
Gets the version information for the firmware
Source§fn device_reset(&mut self) -> Result<(), Error<E>>
fn device_reset(&mut self) -> Result<(), Error<E>>
Executes a reset on the device. This has the same effect as a power cycle
Source§fn start_fan_cleaning(&mut self) -> Result<(), Error<E>>
fn start_fan_cleaning(&mut self) -> Result<(), Error<E>>
This command triggers fan cleaning. The fan is set to the maximum speed for 10 seconds and then automatically stopped. Wait at least 10s after this command before starting a measurement.
Source§fn activate_sht_heater(&mut self) -> Result<(), Error<E>>
fn activate_sht_heater(&mut self) -> Result<(), Error<E>>
This command allows you to use the inbuilt heater in SHT sensor to reverse creep at high humidity. This command activates the SHT sensor heater with 200mW for 1s. The heater is then automatically deactivated again. For firmware versions with an Execution Time of 20ms in the table below, the Get SHT Heater Measurements command can be polled to check whether the heating is finished to trigger another cycle to maximize the duty cycle. Older firmware version do not yet support Get SHT Heater Measurements. Wait at least 20s after this command before starting a measurement to get coherent temperature values (heating consequence to disappear).
Source§fn sht_heater_measurements(&mut self) -> Result<ShtHeaterMeasurements, Error<E>>
fn sht_heater_measurements(&mut self) -> Result<ShtHeaterMeasurements, Error<E>>
Get the measurement values when the SHT sensor heating is finished. Note: This command is only available from the Firmware Version specified in the table below. It must be used after the Activate SHT Heater command. The command can be queried every 50ms to check if the heating cycle is finished and measurements are available.
Source§impl<T, E> Sen62CommandsAsync<E> for Twhere
T: Sen6xConnection<Sen62, E>,
impl<T, E> Sen62CommandsAsync<E> for Twhere
T: Sen6xConnection<Sen62, E>,
Source§async fn start_continuous_measurement(&mut self) -> Result<(), Error<E>>
async fn start_continuous_measurement(&mut self) -> Result<(), Error<E>>
Starts a continuous measurement. After starting the measurement, it takes some time (~1.1s) until the first measurement results are available. You could poll with the command Get Data Ready to check when the results are ready to be read.
Note: For SEN63C and SEN69C only: SEN63C and SEN69C are conditioning the CO2 sensor during the initial 24 seconds after starting a measurement. As this process cannot be interrupted, the following limitations apply during this period:
- You may stop the measurement if needed, but do not start it again until at least 24 seconds have passed to avoid a CO2-1 – CO2 Sensor Error.
- Do not stop the sensor and use the commands Perform Forced CO2 Recalibration, Set CO2 Sensor Automatic Self Calibration or Perform CO2 Sensor Factory Reset.
Source§async fn stop_measurement(&mut self) -> Result<(), Error<E>>
async fn stop_measurement(&mut self) -> Result<(), Error<E>>
Stops the measurement and returns to idle mode.
Source§async fn data_ready(&mut self) -> Result<DataReady, Error<E>>
async fn data_ready(&mut self) -> Result<DataReady, Error<E>>
This command can be used to check if new measurement results are ready to read. The data_ready flag is automatically reset after reading the measurement values.
Source§async fn measured_values(&mut self) -> Result<MeasuredValuesSen62, Error<E>>
async fn measured_values(&mut self) -> Result<MeasuredValuesSen62, Error<E>>
Returns the measured values. The command data_ready can be used to check if new data is available since the last read operation. If no new data is available, the previous values will be returned. If no data is available at all (e.g. measurement not running for at least one second), all values will be None
Source§async fn raw_values(&mut self) -> Result<RawValuesSen62Sen63c, Error<E>>
async fn raw_values(&mut self) -> Result<RawValuesSen62Sen63c, Error<E>>
Returns the measured raw values. The command data_ready can be used to check if new data is available since the last read operation. If no new data is available, the previous values will be returned. If no data is available at all (e.g. measurement not running for at least one second), all values will be None
Source§async fn number_concentration_values(
&mut self,
) -> Result<NumberConcentrationValues, Error<E>>
async fn number_concentration_values( &mut self, ) -> Result<NumberConcentrationValues, Error<E>>
Returns the measured number concentration values. The command Get Data Ready can be used to check if new data is available since the last read operation. If no new data is available, the previous values will be returned. If no data is available at all (e.g. measurement not running for at least one second), all values will be None
Source§async fn set_temperature_offset_parameters(
&mut self,
tx: TemperatureOffsetParameters,
) -> Result<(), Error<E>>
async fn set_temperature_offset_parameters( &mut self, tx: TemperatureOffsetParameters, ) -> Result<(), Error<E>>
This command allows to compensate temperature effects of the design-in at customer side by applying custom temperature offsets to the ambient temperature.
Source§async fn set_temperature_acceleration_parameters(
&mut self,
tx: TemperatureAccelerationParameters,
) -> Result<(), Error<E>>
async fn set_temperature_acceleration_parameters( &mut self, tx: TemperatureAccelerationParameters, ) -> Result<(), Error<E>>
This command allows to set custom temperature acceleration parameters of the RH/T engine. It overwrites the default temperature acceleration parameters of the RH/T engine with custom values.
Source§async fn product_name(&mut self) -> Result<FixedStr<32>, Error<E>>
async fn product_name(&mut self) -> Result<FixedStr<32>, Error<E>>
Gets the product name from the device
Source§async fn serial_number(&mut self) -> Result<FixedStr<32>, Error<E>>
async fn serial_number(&mut self) -> Result<FixedStr<32>, Error<E>>
Gets the serial number from the device.
Source§async fn device_status(&mut self) -> Result<DeviceStatus, Error<E>>
async fn device_status(&mut self) -> Result<DeviceStatus, Error<E>>
Reads the current device status.
Use this command to get detailed information about the device status. The device status is encoded in flags. Each device status flag represents a single bit in a 32-bit integer value. If more than one error is present, the device status register value is the sum of the corresponding flag values. For details about the available flags, refer to the Device Status Register documentation.
Note: The status flags of type “Error” are sticky, i.e. they are not cleared automatically even if the error condition no longer exists. So, they can only be cleared manually with read_and_clear_device_status or through a reset, either by calling Device Reset or through a power cycle. All other flags are not sticky, i.e. they are cleared automatically if the trigger condition disappears
Source§async fn read_and_clear_device_status(
&mut self,
) -> Result<DeviceStatus, Error<E>>
async fn read_and_clear_device_status( &mut self, ) -> Result<DeviceStatus, Error<E>>
Reads the current device status (like command Read device_status) and afterwards clears all flags
Source§async fn version(&mut self) -> Result<Version, Error<E>>
async fn version(&mut self) -> Result<Version, Error<E>>
Gets the version information for the firmware
Source§async fn device_reset(&mut self) -> Result<(), Error<E>>
async fn device_reset(&mut self) -> Result<(), Error<E>>
Executes a reset on the device. This has the same effect as a power cycle
Source§async fn start_fan_cleaning(&mut self) -> Result<(), Error<E>>
async fn start_fan_cleaning(&mut self) -> Result<(), Error<E>>
This command triggers fan cleaning. The fan is set to the maximum speed for 10 seconds and then automatically stopped. Wait at least 10s after this command before starting a measurement.
Source§async fn activate_sht_heater(&mut self) -> Result<(), Error<E>>
async fn activate_sht_heater(&mut self) -> Result<(), Error<E>>
This command allows you to use the inbuilt heater in SHT sensor to reverse creep at high humidity. This command activates the SHT sensor heater with 200mW for 1s. The heater is then automatically deactivated again. For firmware versions with an Execution Time of 20ms in the table below, the Get SHT Heater Measurements command can be polled to check whether the heating is finished to trigger another cycle to maximize the duty cycle. Older firmware version do not yet support Get SHT Heater Measurements. Wait at least 20s after this command before starting a measurement to get coherent temperature values (heating consequence to disappear).
Source§async fn sht_heater_measurements(
&mut self,
) -> Result<ShtHeaterMeasurements, Error<E>>
async fn sht_heater_measurements( &mut self, ) -> Result<ShtHeaterMeasurements, Error<E>>
Get the measurement values when the SHT sensor heating is finished. Note: This command is only available from the Firmware Version specified in the table below. It must be used after the Activate SHT Heater command. The command can be queried every 50ms to check if the heating cycle is finished and measurements are available.
Source§impl<T, E> Sen63cCommands<E> for Twhere
T: Sen6xConnection<Sen63c, E>,
impl<T, E> Sen63cCommands<E> for Twhere
T: Sen6xConnection<Sen63c, E>,
Source§fn start_continuous_measurement(&mut self) -> Result<(), Error<E>>
fn start_continuous_measurement(&mut self) -> Result<(), Error<E>>
Starts a continuous measurement. After starting the measurement, it takes some time (~1.1s) until the first measurement results are available. You could poll with the command Get Data Ready to check when the results are ready to be read.
Note: For SEN63C and SEN69C only: SEN63C and SEN69C are conditioning the CO2 sensor during the initial 24 seconds after starting a measurement. As this process cannot be interrupted, the following limitations apply during this period:
- You may stop the measurement if needed, but do not start it again until at least 24 seconds have passed to avoid a CO2-1 – CO2 Sensor Error.
- Do not stop the sensor and use the commands Perform Forced CO2 Recalibration, Set CO2 Sensor Automatic Self Calibration or Perform CO2 Sensor Factory Reset.
Source§fn stop_measurement(&mut self) -> Result<(), Error<E>>
fn stop_measurement(&mut self) -> Result<(), Error<E>>
Stops the measurement and returns to idle mode.
Source§fn data_ready(&mut self) -> Result<DataReady, Error<E>>
fn data_ready(&mut self) -> Result<DataReady, Error<E>>
This command can be used to check if new measurement results are ready to read. The data_ready flag is automatically reset after reading the measurement values.
Source§fn measured_values(&mut self) -> Result<MeasuredValuesSen63c, Error<E>>
fn measured_values(&mut self) -> Result<MeasuredValuesSen63c, Error<E>>
Returns the measured values. The command data_ready can be used to check if new data is available since the last read operation. If no new data is available, the previous values will be returned. If no data is available at all (e.g. measurement not running for at least one second), all values will be None
Source§fn raw_values(&mut self) -> Result<RawValuesSen62Sen63c, Error<E>>
fn raw_values(&mut self) -> Result<RawValuesSen62Sen63c, Error<E>>
Returns the measured raw values. The command data_ready can be used to check if new data is available since the last read operation. If no new data is available, the previous values will be returned. If no data is available at all (e.g. measurement not running for at least one second), all values will be None
Source§fn number_concentration_values(
&mut self,
) -> Result<NumberConcentrationValues, Error<E>>
fn number_concentration_values( &mut self, ) -> Result<NumberConcentrationValues, Error<E>>
Returns the measured number concentration values. The command Get Data Ready can be used to check if new data is available since the last read operation. If no new data is available, the previous values will be returned. If no data is available at all (e.g. measurement not running for at least one second), all values will be None
Source§fn set_temperature_offset_parameters(
&mut self,
tx: TemperatureOffsetParameters,
) -> Result<(), Error<E>>
fn set_temperature_offset_parameters( &mut self, tx: TemperatureOffsetParameters, ) -> Result<(), Error<E>>
This command allows to compensate temperature effects of the design-in at customer side by applying custom temperature offsets to the ambient temperature.
Source§fn set_temperature_acceleration_parameters(
&mut self,
tx: TemperatureAccelerationParameters,
) -> Result<(), Error<E>>
fn set_temperature_acceleration_parameters( &mut self, tx: TemperatureAccelerationParameters, ) -> Result<(), Error<E>>
This command allows to set custom temperature acceleration parameters of the RH/T engine. It overwrites the default temperature acceleration parameters of the RH/T engine with custom values.
Source§fn product_name(&mut self) -> Result<FixedStr<32>, Error<E>>
fn product_name(&mut self) -> Result<FixedStr<32>, Error<E>>
Gets the product name from the device
Source§fn serial_number(&mut self) -> Result<FixedStr<32>, Error<E>>
fn serial_number(&mut self) -> Result<FixedStr<32>, Error<E>>
Gets the serial number from the device.
Source§fn device_status(&mut self) -> Result<DeviceStatus, Error<E>>
fn device_status(&mut self) -> Result<DeviceStatus, Error<E>>
Reads the current device status.
Use this command to get detailed information about the device status. The device status is encoded in flags. Each device status flag represents a single bit in a 32-bit integer value. If more than one error is present, the device status register value is the sum of the corresponding flag values. For details about the available flags, refer to the Device Status Register documentation.
Note: The status flags of type “Error” are sticky, i.e. they are not cleared automatically even if the error condition no longer exists. So, they can only be cleared manually with read_and_clear_device_status or through a reset, either by calling Device Reset or through a power cycle. All other flags are not sticky, i.e. they are cleared automatically if the trigger condition disappears
Source§fn read_and_clear_device_status(&mut self) -> Result<DeviceStatus, Error<E>>
fn read_and_clear_device_status(&mut self) -> Result<DeviceStatus, Error<E>>
Reads the current device status (like command Read device_status) and afterwards clears all flags
Source§fn version(&mut self) -> Result<Version, Error<E>>
fn version(&mut self) -> Result<Version, Error<E>>
Gets the version information for the firmware
Source§fn device_reset(&mut self) -> Result<(), Error<E>>
fn device_reset(&mut self) -> Result<(), Error<E>>
Executes a reset on the device. This has the same effect as a power cycle
Source§fn start_fan_cleaning(&mut self) -> Result<(), Error<E>>
fn start_fan_cleaning(&mut self) -> Result<(), Error<E>>
This command triggers fan cleaning. The fan is set to the maximum speed for 10 seconds and then automatically stopped. Wait at least 10s after this command before starting a measurement.
Source§fn activate_sht_heater(&mut self) -> Result<(), Error<E>>
fn activate_sht_heater(&mut self) -> Result<(), Error<E>>
This command allows you to use the inbuilt heater in SHT sensor to reverse creep at high humidity. This command activates the SHT sensor heater with 200mW for 1s. The heater is then automatically deactivated again. For firmware versions with an Execution Time of 20ms in the table below, the Get SHT Heater Measurements command can be polled to check whether the heating is finished to trigger another cycle to maximize the duty cycle. Older firmware version do not yet support Get SHT Heater Measurements. Wait at least 20s after this command before starting a measurement to get coherent temperature values (heating consequence to disappear).
Source§fn sht_heater_measurements(&mut self) -> Result<ShtHeaterMeasurements, Error<E>>
fn sht_heater_measurements(&mut self) -> Result<ShtHeaterMeasurements, Error<E>>
Get the measurement values when the SHT sensor heating is finished. Note: This command is only available from the Firmware Version specified in the table below. It must be used after the Activate SHT Heater command. The command can be queried every 50ms to check if the heating cycle is finished and measurements are available.
Source§fn set_perform_forced_co2_recalibration(
&mut self,
tx: PpmU16,
) -> Result<Co2Correction, Error<E>>
fn set_perform_forced_co2_recalibration( &mut self, tx: PpmU16, ) -> Result<Co2Correction, Error<E>>
Execute the forced recalibration (FRC) of the CO2 signal. To successfully conduct an accurate FRC, the following steps need to be taken:
- Start a measurement with the command Start Continuous Measurement and operate the sensor for at least 3 minutes in an environment with homogenous and constant CO2 concentration. If applicable, the reference value for altitude or pressure compensation must be provided to the sensor beforehand with the command Set Sensor Altitude or Set Ambient Pressure respectively.
- Stop the measurement with the command Stop Measurement and wait at least 1400ms.
- Issue the Perform Forced CO2 Recalibration command with the reference CO2 concentration that the sensor should be set to. The recalibration procedure will take about 500 ms to complete, during which time no other functions can be executed. A return value of 0xFFFF indicates that the FRC has failed
Source§fn perform_co2_sensor_factory_reset(&mut self) -> Result<(), Error<E>>
fn perform_co2_sensor_factory_reset(&mut self) -> Result<(), Error<E>>
This command resets all CO2 sensor configuration settings stored in the EEPROM and erases the forced recalibration (FRC) and automatic self-calibration (ASC) algorithm history of the CO2 sensor, restarting the bypass phase. Refer to the STCC4 datasheet for more information.
Source§fn co2_sensor_automatic_self_calibration(&mut self) -> Result<bool, Error<E>>
fn co2_sensor_automatic_self_calibration(&mut self) -> Result<bool, Error<E>>
Gets the status of the CO2 sensor automatic self-calibration (ASC). The CO2 sensor supports automatic self-calibration (ASC) for long-term stability of the CO2 output. This feature can be enabled or disabled. By default, it is enabled.
Source§fn set_co2_sensor_automatic_self_calibration(
&mut self,
tx: bool,
) -> Result<(), Error<E>>
fn set_co2_sensor_automatic_self_calibration( &mut self, tx: bool, ) -> Result<(), Error<E>>
Sets the status of the CO2 sensor automatic self-calibration (ASC). The CO2 sensor supports automatic self-calibration (ASC) for long-term stability of the CO2 output. This feature can be enabled or disabled. By default, it is enabled. The automatic self-calibration can be disabled for testing under lab conditions where concentrations below 400ppm are expected, to avoid an alteration of the baseline. In the field, ASC must be enabled and exposure to fresh air (i.e. CO2 concentration at 400 ppm) at least once per week is required to reach datasheet specifications
Source§fn ambient_pressure(&mut self) -> Result<Hpa, Error<E>>
fn ambient_pressure(&mut self) -> Result<Hpa, Error<E>>
Gets the ambient pressure value that was set with Set Ambient Pressure. The ambient pressure can be used for pressure compensation in the CO2 sensor
Source§fn set_ambient_pressure(&mut self, tx: Hpa) -> Result<(), Error<E>>
fn set_ambient_pressure(&mut self, tx: Hpa) -> Result<(), Error<E>>
Sets the ambient pressure value. The ambient pressure can be used for pressure compensation in the CO2 sensor. Setting an ambient pressure overrides any pressure compensation based on a previously set sensor altitude. Use of this command is recommended for applications experiencing significant ambient pressure changes to ensure CO2 sensor accuracy. Valid input values are between 700 to 1’200 hPa. The default value is 1013 hPa.
Source§fn sensor_altitude(&mut self) -> Result<Meters, Error<E>>
fn sensor_altitude(&mut self) -> Result<Meters, Error<E>>
Gets the current sensor altitude. The sensor altitude can be used for pressure compensation in the CO2 sensor.
Source§fn set_sensor_altitude(&mut self, tx: Meters) -> Result<(), Error<E>>
fn set_sensor_altitude(&mut self, tx: Meters) -> Result<(), Error<E>>
Sets the current sensor altitude. The sensor altitude can be used for pressure compensation in the CO2 sensor. The default sensor altitude value is set to 0 meters above sea level. Valid input values are between 0 and 3000m.
Source§impl<T, E> Sen63cCommandsAsync<E> for Twhere
T: Sen6xConnection<Sen63c, E>,
impl<T, E> Sen63cCommandsAsync<E> for Twhere
T: Sen6xConnection<Sen63c, E>,
Source§async fn start_continuous_measurement(&mut self) -> Result<(), Error<E>>
async fn start_continuous_measurement(&mut self) -> Result<(), Error<E>>
Starts a continuous measurement. After starting the measurement, it takes some time (~1.1s) until the first measurement results are available. You could poll with the command Get Data Ready to check when the results are ready to be read.
Note: For SEN63C and SEN69C only: SEN63C and SEN69C are conditioning the CO2 sensor during the initial 24 seconds after starting a measurement. As this process cannot be interrupted, the following limitations apply during this period:
- You may stop the measurement if needed, but do not start it again until at least 24 seconds have passed to avoid a CO2-1 – CO2 Sensor Error.
- Do not stop the sensor and use the commands Perform Forced CO2 Recalibration, Set CO2 Sensor Automatic Self Calibration or Perform CO2 Sensor Factory Reset.
Source§async fn stop_measurement(&mut self) -> Result<(), Error<E>>
async fn stop_measurement(&mut self) -> Result<(), Error<E>>
Stops the measurement and returns to idle mode.
Source§async fn data_ready(&mut self) -> Result<DataReady, Error<E>>
async fn data_ready(&mut self) -> Result<DataReady, Error<E>>
This command can be used to check if new measurement results are ready to read. The data_ready flag is automatically reset after reading the measurement values.
Source§async fn measured_values(&mut self) -> Result<MeasuredValuesSen63c, Error<E>>
async fn measured_values(&mut self) -> Result<MeasuredValuesSen63c, Error<E>>
Returns the measured values. The command data_ready can be used to check if new data is available since the last read operation. If no new data is available, the previous values will be returned. If no data is available at all (e.g. measurement not running for at least one second), all values will be None
Source§async fn raw_values(&mut self) -> Result<RawValuesSen62Sen63c, Error<E>>
async fn raw_values(&mut self) -> Result<RawValuesSen62Sen63c, Error<E>>
Returns the measured raw values. The command data_ready can be used to check if new data is available since the last read operation. If no new data is available, the previous values will be returned. If no data is available at all (e.g. measurement not running for at least one second), all values will be None
Source§async fn number_concentration_values(
&mut self,
) -> Result<NumberConcentrationValues, Error<E>>
async fn number_concentration_values( &mut self, ) -> Result<NumberConcentrationValues, Error<E>>
Returns the measured number concentration values. The command Get Data Ready can be used to check if new data is available since the last read operation. If no new data is available, the previous values will be returned. If no data is available at all (e.g. measurement not running for at least one second), all values will be None
Source§async fn set_temperature_offset_parameters(
&mut self,
tx: TemperatureOffsetParameters,
) -> Result<(), Error<E>>
async fn set_temperature_offset_parameters( &mut self, tx: TemperatureOffsetParameters, ) -> Result<(), Error<E>>
This command allows to compensate temperature effects of the design-in at customer side by applying custom temperature offsets to the ambient temperature.
Source§async fn set_temperature_acceleration_parameters(
&mut self,
tx: TemperatureAccelerationParameters,
) -> Result<(), Error<E>>
async fn set_temperature_acceleration_parameters( &mut self, tx: TemperatureAccelerationParameters, ) -> Result<(), Error<E>>
This command allows to set custom temperature acceleration parameters of the RH/T engine. It overwrites the default temperature acceleration parameters of the RH/T engine with custom values.
Source§async fn product_name(&mut self) -> Result<FixedStr<32>, Error<E>>
async fn product_name(&mut self) -> Result<FixedStr<32>, Error<E>>
Gets the product name from the device
Source§async fn serial_number(&mut self) -> Result<FixedStr<32>, Error<E>>
async fn serial_number(&mut self) -> Result<FixedStr<32>, Error<E>>
Gets the serial number from the device.
Source§async fn device_status(&mut self) -> Result<DeviceStatus, Error<E>>
async fn device_status(&mut self) -> Result<DeviceStatus, Error<E>>
Reads the current device status.
Use this command to get detailed information about the device status. The device status is encoded in flags. Each device status flag represents a single bit in a 32-bit integer value. If more than one error is present, the device status register value is the sum of the corresponding flag values. For details about the available flags, refer to the Device Status Register documentation.
Note: The status flags of type “Error” are sticky, i.e. they are not cleared automatically even if the error condition no longer exists. So, they can only be cleared manually with read_and_clear_device_status or through a reset, either by calling Device Reset or through a power cycle. All other flags are not sticky, i.e. they are cleared automatically if the trigger condition disappears
Source§async fn read_and_clear_device_status(
&mut self,
) -> Result<DeviceStatus, Error<E>>
async fn read_and_clear_device_status( &mut self, ) -> Result<DeviceStatus, Error<E>>
Reads the current device status (like command Read device_status) and afterwards clears all flags
Source§async fn version(&mut self) -> Result<Version, Error<E>>
async fn version(&mut self) -> Result<Version, Error<E>>
Gets the version information for the firmware
Source§async fn device_reset(&mut self) -> Result<(), Error<E>>
async fn device_reset(&mut self) -> Result<(), Error<E>>
Executes a reset on the device. This has the same effect as a power cycle
Source§async fn start_fan_cleaning(&mut self) -> Result<(), Error<E>>
async fn start_fan_cleaning(&mut self) -> Result<(), Error<E>>
This command triggers fan cleaning. The fan is set to the maximum speed for 10 seconds and then automatically stopped. Wait at least 10s after this command before starting a measurement.
Source§async fn activate_sht_heater(&mut self) -> Result<(), Error<E>>
async fn activate_sht_heater(&mut self) -> Result<(), Error<E>>
This command allows you to use the inbuilt heater in SHT sensor to reverse creep at high humidity. This command activates the SHT sensor heater with 200mW for 1s. The heater is then automatically deactivated again. For firmware versions with an Execution Time of 20ms in the table below, the Get SHT Heater Measurements command can be polled to check whether the heating is finished to trigger another cycle to maximize the duty cycle. Older firmware version do not yet support Get SHT Heater Measurements. Wait at least 20s after this command before starting a measurement to get coherent temperature values (heating consequence to disappear).
Source§async fn sht_heater_measurements(
&mut self,
) -> Result<ShtHeaterMeasurements, Error<E>>
async fn sht_heater_measurements( &mut self, ) -> Result<ShtHeaterMeasurements, Error<E>>
Get the measurement values when the SHT sensor heating is finished. Note: This command is only available from the Firmware Version specified in the table below. It must be used after the Activate SHT Heater command. The command can be queried every 50ms to check if the heating cycle is finished and measurements are available.
Source§async fn set_perform_forced_co2_recalibration(
&mut self,
tx: PpmU16,
) -> Result<Co2Correction, Error<E>>
async fn set_perform_forced_co2_recalibration( &mut self, tx: PpmU16, ) -> Result<Co2Correction, Error<E>>
Execute the forced recalibration (FRC) of the CO2 signal. To successfully conduct an accurate FRC, the following steps need to be taken:
- Start a measurement with the command Start Continuous Measurement and operate the sensor for at least 3 minutes in an environment with homogenous and constant CO2 concentration. If applicable, the reference value for altitude or pressure compensation must be provided to the sensor beforehand with the command Set Sensor Altitude or Set Ambient Pressure respectively.
- Stop the measurement with the command Stop Measurement and wait at least 1400ms.
- Issue the Perform Forced CO2 Recalibration command with the reference CO2 concentration that the sensor should be set to. The recalibration procedure will take about 500 ms to complete, during which time no other functions can be executed. A return value of 0xFFFF indicates that the FRC has failed
Source§async fn perform_co2_sensor_factory_reset(&mut self) -> Result<(), Error<E>>
async fn perform_co2_sensor_factory_reset(&mut self) -> Result<(), Error<E>>
This command resets all CO2 sensor configuration settings stored in the EEPROM and erases the forced recalibration (FRC) and automatic self-calibration (ASC) algorithm history of the CO2 sensor, restarting the bypass phase. Refer to the STCC4 datasheet for more information.
Source§async fn co2_sensor_automatic_self_calibration(
&mut self,
) -> Result<bool, Error<E>>
async fn co2_sensor_automatic_self_calibration( &mut self, ) -> Result<bool, Error<E>>
Gets the status of the CO2 sensor automatic self-calibration (ASC). The CO2 sensor supports automatic self-calibration (ASC) for long-term stability of the CO2 output. This feature can be enabled or disabled. By default, it is enabled.
Source§async fn set_co2_sensor_automatic_self_calibration(
&mut self,
tx: bool,
) -> Result<(), Error<E>>
async fn set_co2_sensor_automatic_self_calibration( &mut self, tx: bool, ) -> Result<(), Error<E>>
Sets the status of the CO2 sensor automatic self-calibration (ASC). The CO2 sensor supports automatic self-calibration (ASC) for long-term stability of the CO2 output. This feature can be enabled or disabled. By default, it is enabled. The automatic self-calibration can be disabled for testing under lab conditions where concentrations below 400ppm are expected, to avoid an alteration of the baseline. In the field, ASC must be enabled and exposure to fresh air (i.e. CO2 concentration at 400 ppm) at least once per week is required to reach datasheet specifications
Source§async fn ambient_pressure(&mut self) -> Result<Hpa, Error<E>>
async fn ambient_pressure(&mut self) -> Result<Hpa, Error<E>>
Gets the ambient pressure value that was set with Set Ambient Pressure. The ambient pressure can be used for pressure compensation in the CO2 sensor
Source§async fn set_ambient_pressure(&mut self, tx: Hpa) -> Result<(), Error<E>>
async fn set_ambient_pressure(&mut self, tx: Hpa) -> Result<(), Error<E>>
Sets the ambient pressure value. The ambient pressure can be used for pressure compensation in the CO2 sensor. Setting an ambient pressure overrides any pressure compensation based on a previously set sensor altitude. Use of this command is recommended for applications experiencing significant ambient pressure changes to ensure CO2 sensor accuracy. Valid input values are between 700 to 1’200 hPa. The default value is 1013 hPa.
Source§async fn sensor_altitude(&mut self) -> Result<Meters, Error<E>>
async fn sensor_altitude(&mut self) -> Result<Meters, Error<E>>
Gets the current sensor altitude. The sensor altitude can be used for pressure compensation in the CO2 sensor.
Source§async fn set_sensor_altitude(&mut self, tx: Meters) -> Result<(), Error<E>>
async fn set_sensor_altitude(&mut self, tx: Meters) -> Result<(), Error<E>>
Sets the current sensor altitude. The sensor altitude can be used for pressure compensation in the CO2 sensor. The default sensor altitude value is set to 0 meters above sea level. Valid input values are between 0 and 3000m.
Source§impl<T, E> Sen65Commands<E> for Twhere
T: Sen6xConnection<Sen65, E>,
impl<T, E> Sen65Commands<E> for Twhere
T: Sen6xConnection<Sen65, E>,
Source§fn start_continuous_measurement(&mut self) -> Result<(), Error<E>>
fn start_continuous_measurement(&mut self) -> Result<(), Error<E>>
Starts a continuous measurement. After starting the measurement, it takes some time (~1.1s) until the first measurement results are available. You could poll with the command Get Data Ready to check when the results are ready to be read.
Note: For SEN63C and SEN69C only: SEN63C and SEN69C are conditioning the CO2 sensor during the initial 24 seconds after starting a measurement. As this process cannot be interrupted, the following limitations apply during this period:
- You may stop the measurement if needed, but do not start it again until at least 24 seconds have passed to avoid a CO2-1 – CO2 Sensor Error.
- Do not stop the sensor and use the commands Perform Forced CO2 Recalibration, Set CO2 Sensor Automatic Self Calibration or Perform CO2 Sensor Factory Reset.
Source§fn stop_measurement(&mut self) -> Result<(), Error<E>>
fn stop_measurement(&mut self) -> Result<(), Error<E>>
Stops the measurement and returns to idle mode.
Source§fn data_ready(&mut self) -> Result<DataReady, Error<E>>
fn data_ready(&mut self) -> Result<DataReady, Error<E>>
This command can be used to check if new measurement results are ready to read. The data_ready flag is automatically reset after reading the measurement values.
Source§fn measured_values(&mut self) -> Result<MeasuredValuesSen65, Error<E>>
fn measured_values(&mut self) -> Result<MeasuredValuesSen65, Error<E>>
Returns the measured values. The command data_ready can be used to check if new data is available since the last read operation. If no new data is available, the previous values will be returned. If no data is available at all (e.g. measurement not running for at least one second), all values will be None
Source§fn raw_values(&mut self) -> Result<RawValuesSen65Sen68Sen69c, Error<E>>
fn raw_values(&mut self) -> Result<RawValuesSen65Sen68Sen69c, Error<E>>
Returns the measured raw values. The command data_ready can be used to check if new data is available since the last read operation. If no new data is available, the previous values will be returned. If no data is available at all (e.g. measurement not running for at least one second), all values will be None
Source§fn number_concentration_values(
&mut self,
) -> Result<NumberConcentrationValues, Error<E>>
fn number_concentration_values( &mut self, ) -> Result<NumberConcentrationValues, Error<E>>
Returns the measured number concentration values. The command Get Data Ready can be used to check if new data is available since the last read operation. If no new data is available, the previous values will be returned. If no data is available at all (e.g. measurement not running for at least one second), all values will be None
Source§fn set_temperature_offset_parameters(
&mut self,
tx: TemperatureOffsetParameters,
) -> Result<(), Error<E>>
fn set_temperature_offset_parameters( &mut self, tx: TemperatureOffsetParameters, ) -> Result<(), Error<E>>
This command allows to compensate temperature effects of the design-in at customer side by applying custom temperature offsets to the ambient temperature.
Source§fn set_temperature_acceleration_parameters(
&mut self,
tx: TemperatureAccelerationParameters,
) -> Result<(), Error<E>>
fn set_temperature_acceleration_parameters( &mut self, tx: TemperatureAccelerationParameters, ) -> Result<(), Error<E>>
This command allows to set custom temperature acceleration parameters of the RH/T engine. It overwrites the default temperature acceleration parameters of the RH/T engine with custom values.
Source§fn product_name(&mut self) -> Result<FixedStr<32>, Error<E>>
fn product_name(&mut self) -> Result<FixedStr<32>, Error<E>>
Gets the product name from the device
Source§fn serial_number(&mut self) -> Result<FixedStr<32>, Error<E>>
fn serial_number(&mut self) -> Result<FixedStr<32>, Error<E>>
Gets the serial number from the device.
Source§fn device_status(&mut self) -> Result<DeviceStatus, Error<E>>
fn device_status(&mut self) -> Result<DeviceStatus, Error<E>>
Reads the current device status.
Use this command to get detailed information about the device status. The device status is encoded in flags. Each device status flag represents a single bit in a 32-bit integer value. If more than one error is present, the device status register value is the sum of the corresponding flag values. For details about the available flags, refer to the Device Status Register documentation.
Note: The status flags of type “Error” are sticky, i.e. they are not cleared automatically even if the error condition no longer exists. So, they can only be cleared manually with read_and_clear_device_status or through a reset, either by calling Device Reset or through a power cycle. All other flags are not sticky, i.e. they are cleared automatically if the trigger condition disappears
Source§fn read_and_clear_device_status(&mut self) -> Result<DeviceStatus, Error<E>>
fn read_and_clear_device_status(&mut self) -> Result<DeviceStatus, Error<E>>
Reads the current device status (like command Read device_status) and afterwards clears all flags
Source§fn version(&mut self) -> Result<Version, Error<E>>
fn version(&mut self) -> Result<Version, Error<E>>
Gets the version information for the firmware
Source§fn device_reset(&mut self) -> Result<(), Error<E>>
fn device_reset(&mut self) -> Result<(), Error<E>>
Executes a reset on the device. This has the same effect as a power cycle
Source§fn start_fan_cleaning(&mut self) -> Result<(), Error<E>>
fn start_fan_cleaning(&mut self) -> Result<(), Error<E>>
This command triggers fan cleaning. The fan is set to the maximum speed for 10 seconds and then automatically stopped. Wait at least 10s after this command before starting a measurement.
Source§fn activate_sht_heater(&mut self) -> Result<(), Error<E>>
fn activate_sht_heater(&mut self) -> Result<(), Error<E>>
This command allows you to use the inbuilt heater in SHT sensor to reverse creep at high humidity. This command activates the SHT sensor heater with 200mW for 1s. The heater is then automatically deactivated again. For firmware versions with an Execution Time of 20ms in the table below, the Get SHT Heater Measurements command can be polled to check whether the heating is finished to trigger another cycle to maximize the duty cycle. Older firmware version do not yet support Get SHT Heater Measurements. Wait at least 20s after this command before starting a measurement to get coherent temperature values (heating consequence to disappear).
Source§fn sht_heater_measurements(&mut self) -> Result<ShtHeaterMeasurements, Error<E>>
fn sht_heater_measurements(&mut self) -> Result<ShtHeaterMeasurements, Error<E>>
Get the measurement values when the SHT sensor heating is finished. Note: This command is only available from the Firmware Version specified in the table below. It must be used after the Activate SHT Heater command. The command can be queried every 50ms to check if the heating cycle is finished and measurements are available.
Source§fn voc_algorithm_tuning_parameters(
&mut self,
) -> Result<VocAlgorithmTuningParameters, Error<E>>
fn voc_algorithm_tuning_parameters( &mut self, ) -> Result<VocAlgorithmTuningParameters, Error<E>>
Gets the parameters to customize the VOC algorithm. For more information on what the parameters below do, refer to Sensirion’s VOC Index for Indoor Air Applications.
Source§fn set_voc_algorithm_tuning_parameters(
&mut self,
tx: VocAlgorithmTuningParameters,
) -> Result<(), Error<E>>
fn set_voc_algorithm_tuning_parameters( &mut self, tx: VocAlgorithmTuningParameters, ) -> Result<(), Error<E>>
Sets the parameters to customize the VOC algorithm. It has no effect if at least one parameter is outside the specified range. For more information on what the parameters below do, refer to Sensirion’s VOC Index for Indoor Air Applications.
Source§fn voc_algorithm_state(&mut self) -> Result<VocAlgorithmState, Error<E>>
fn voc_algorithm_state(&mut self) -> Result<VocAlgorithmState, Error<E>>
Allows backup of the VOC algorithm state to resume operation after a power cycle or device reset, skipping initial learning phase. By default, the VOC Engine is reset, and the algorithm state is retained if a measurement is stopped and started again. If the VOC algorithm state shall be reset, a device reset, or a power cycle can be executed.
Source§fn set_voc_algorithm_state(
&mut self,
tx: VocAlgorithmState,
) -> Result<(), Error<E>>
fn set_voc_algorithm_state( &mut self, tx: VocAlgorithmState, ) -> Result<(), Error<E>>
Allows restoration of the VOC algorithm state to resume operation after a power cycle or device reset, skipping initial learning phase. By default, the VOC Engine is reset, and the algorithm state is retained if a measurement is stopped and started again. If the VOC algorithm state shall be reset, a device reset, or a power cycle can be executed. Sets the VOC algorithm state previously received with the Get VOC Algorithm State command. This command is only available in idle mode and the state will be applied only once when starting the next measurement. In measurement mode, this command has no effect.
Source§fn nox_algorithm_tuning_parameters(
&mut self,
) -> Result<NoxAlgorithmTuningParameters, Error<E>>
fn nox_algorithm_tuning_parameters( &mut self, ) -> Result<NoxAlgorithmTuningParameters, Error<E>>
Gets the parameters to customize the NOx algorithm. For more information on what the parameters below do, refer to Sensirion’s NOx Index for Indoor Air Applications.
Source§fn set_nox_algorithm_tuning_parameters(
&mut self,
tx: NoxAlgorithmTuningParameters,
) -> Result<(), Error<E>>
fn set_nox_algorithm_tuning_parameters( &mut self, tx: NoxAlgorithmTuningParameters, ) -> Result<(), Error<E>>
Sets the parameters to customize the NOx algorithm. It has no effect if at least one parameter is outside the specified range. To check whether the parameters have been set successfully, use the Get NOx Algorithm Tuning Parameters command. For more information on what the parameters below do, refer to Sensirion’s NOx Index for Indoor Air Applications.
Source§impl<T, E> Sen65CommandsAsync<E> for Twhere
T: Sen6xConnection<Sen65, E>,
impl<T, E> Sen65CommandsAsync<E> for Twhere
T: Sen6xConnection<Sen65, E>,
Source§async fn start_continuous_measurement(&mut self) -> Result<(), Error<E>>
async fn start_continuous_measurement(&mut self) -> Result<(), Error<E>>
Starts a continuous measurement. After starting the measurement, it takes some time (~1.1s) until the first measurement results are available. You could poll with the command Get Data Ready to check when the results are ready to be read.
Note: For SEN63C and SEN69C only: SEN63C and SEN69C are conditioning the CO2 sensor during the initial 24 seconds after starting a measurement. As this process cannot be interrupted, the following limitations apply during this period:
- You may stop the measurement if needed, but do not start it again until at least 24 seconds have passed to avoid a CO2-1 – CO2 Sensor Error.
- Do not stop the sensor and use the commands Perform Forced CO2 Recalibration, Set CO2 Sensor Automatic Self Calibration or Perform CO2 Sensor Factory Reset.
Source§async fn stop_measurement(&mut self) -> Result<(), Error<E>>
async fn stop_measurement(&mut self) -> Result<(), Error<E>>
Stops the measurement and returns to idle mode.
Source§async fn data_ready(&mut self) -> Result<DataReady, Error<E>>
async fn data_ready(&mut self) -> Result<DataReady, Error<E>>
This command can be used to check if new measurement results are ready to read. The data_ready flag is automatically reset after reading the measurement values.
Source§async fn measured_values(&mut self) -> Result<MeasuredValuesSen65, Error<E>>
async fn measured_values(&mut self) -> Result<MeasuredValuesSen65, Error<E>>
Returns the measured values. The command data_ready can be used to check if new data is available since the last read operation. If no new data is available, the previous values will be returned. If no data is available at all (e.g. measurement not running for at least one second), all values will be None
Source§async fn raw_values(&mut self) -> Result<RawValuesSen65Sen68Sen69c, Error<E>>
async fn raw_values(&mut self) -> Result<RawValuesSen65Sen68Sen69c, Error<E>>
Returns the measured raw values. The command data_ready can be used to check if new data is available since the last read operation. If no new data is available, the previous values will be returned. If no data is available at all (e.g. measurement not running for at least one second), all values will be None
Source§async fn number_concentration_values(
&mut self,
) -> Result<NumberConcentrationValues, Error<E>>
async fn number_concentration_values( &mut self, ) -> Result<NumberConcentrationValues, Error<E>>
Returns the measured number concentration values. The command Get Data Ready can be used to check if new data is available since the last read operation. If no new data is available, the previous values will be returned. If no data is available at all (e.g. measurement not running for at least one second), all values will be None
Source§async fn set_temperature_offset_parameters(
&mut self,
tx: TemperatureOffsetParameters,
) -> Result<(), Error<E>>
async fn set_temperature_offset_parameters( &mut self, tx: TemperatureOffsetParameters, ) -> Result<(), Error<E>>
This command allows to compensate temperature effects of the design-in at customer side by applying custom temperature offsets to the ambient temperature.
Source§async fn set_temperature_acceleration_parameters(
&mut self,
tx: TemperatureAccelerationParameters,
) -> Result<(), Error<E>>
async fn set_temperature_acceleration_parameters( &mut self, tx: TemperatureAccelerationParameters, ) -> Result<(), Error<E>>
This command allows to set custom temperature acceleration parameters of the RH/T engine. It overwrites the default temperature acceleration parameters of the RH/T engine with custom values.
Source§async fn product_name(&mut self) -> Result<FixedStr<32>, Error<E>>
async fn product_name(&mut self) -> Result<FixedStr<32>, Error<E>>
Gets the product name from the device
Source§async fn serial_number(&mut self) -> Result<FixedStr<32>, Error<E>>
async fn serial_number(&mut self) -> Result<FixedStr<32>, Error<E>>
Gets the serial number from the device.
Source§async fn device_status(&mut self) -> Result<DeviceStatus, Error<E>>
async fn device_status(&mut self) -> Result<DeviceStatus, Error<E>>
Reads the current device status.
Use this command to get detailed information about the device status. The device status is encoded in flags. Each device status flag represents a single bit in a 32-bit integer value. If more than one error is present, the device status register value is the sum of the corresponding flag values. For details about the available flags, refer to the Device Status Register documentation.
Note: The status flags of type “Error” are sticky, i.e. they are not cleared automatically even if the error condition no longer exists. So, they can only be cleared manually with read_and_clear_device_status or through a reset, either by calling Device Reset or through a power cycle. All other flags are not sticky, i.e. they are cleared automatically if the trigger condition disappears
Source§async fn read_and_clear_device_status(
&mut self,
) -> Result<DeviceStatus, Error<E>>
async fn read_and_clear_device_status( &mut self, ) -> Result<DeviceStatus, Error<E>>
Reads the current device status (like command Read device_status) and afterwards clears all flags
Source§async fn version(&mut self) -> Result<Version, Error<E>>
async fn version(&mut self) -> Result<Version, Error<E>>
Gets the version information for the firmware
Source§async fn device_reset(&mut self) -> Result<(), Error<E>>
async fn device_reset(&mut self) -> Result<(), Error<E>>
Executes a reset on the device. This has the same effect as a power cycle
Source§async fn start_fan_cleaning(&mut self) -> Result<(), Error<E>>
async fn start_fan_cleaning(&mut self) -> Result<(), Error<E>>
This command triggers fan cleaning. The fan is set to the maximum speed for 10 seconds and then automatically stopped. Wait at least 10s after this command before starting a measurement.
Source§async fn activate_sht_heater(&mut self) -> Result<(), Error<E>>
async fn activate_sht_heater(&mut self) -> Result<(), Error<E>>
This command allows you to use the inbuilt heater in SHT sensor to reverse creep at high humidity. This command activates the SHT sensor heater with 200mW for 1s. The heater is then automatically deactivated again. For firmware versions with an Execution Time of 20ms in the table below, the Get SHT Heater Measurements command can be polled to check whether the heating is finished to trigger another cycle to maximize the duty cycle. Older firmware version do not yet support Get SHT Heater Measurements. Wait at least 20s after this command before starting a measurement to get coherent temperature values (heating consequence to disappear).
Source§async fn sht_heater_measurements(
&mut self,
) -> Result<ShtHeaterMeasurements, Error<E>>
async fn sht_heater_measurements( &mut self, ) -> Result<ShtHeaterMeasurements, Error<E>>
Get the measurement values when the SHT sensor heating is finished. Note: This command is only available from the Firmware Version specified in the table below. It must be used after the Activate SHT Heater command. The command can be queried every 50ms to check if the heating cycle is finished and measurements are available.
Source§async fn voc_algorithm_tuning_parameters(
&mut self,
) -> Result<VocAlgorithmTuningParameters, Error<E>>
async fn voc_algorithm_tuning_parameters( &mut self, ) -> Result<VocAlgorithmTuningParameters, Error<E>>
Gets the parameters to customize the VOC algorithm. For more information on what the parameters below do, refer to Sensirion’s VOC Index for Indoor Air Applications.
Source§async fn set_voc_algorithm_tuning_parameters(
&mut self,
tx: VocAlgorithmTuningParameters,
) -> Result<(), Error<E>>
async fn set_voc_algorithm_tuning_parameters( &mut self, tx: VocAlgorithmTuningParameters, ) -> Result<(), Error<E>>
Sets the parameters to customize the VOC algorithm. It has no effect if at least one parameter is outside the specified range. For more information on what the parameters below do, refer to Sensirion’s VOC Index for Indoor Air Applications.
Source§async fn voc_algorithm_state(&mut self) -> Result<VocAlgorithmState, Error<E>>
async fn voc_algorithm_state(&mut self) -> Result<VocAlgorithmState, Error<E>>
Allows backup of the VOC algorithm state to resume operation after a power cycle or device reset, skipping initial learning phase. By default, the VOC Engine is reset, and the algorithm state is retained if a measurement is stopped and started again. If the VOC algorithm state shall be reset, a device reset, or a power cycle can be executed.
Source§async fn set_voc_algorithm_state(
&mut self,
tx: VocAlgorithmState,
) -> Result<(), Error<E>>
async fn set_voc_algorithm_state( &mut self, tx: VocAlgorithmState, ) -> Result<(), Error<E>>
Allows restoration of the VOC algorithm state to resume operation after a power cycle or device reset, skipping initial learning phase. By default, the VOC Engine is reset, and the algorithm state is retained if a measurement is stopped and started again. If the VOC algorithm state shall be reset, a device reset, or a power cycle can be executed. Sets the VOC algorithm state previously received with the Get VOC Algorithm State command. This command is only available in idle mode and the state will be applied only once when starting the next measurement. In measurement mode, this command has no effect.
Source§async fn nox_algorithm_tuning_parameters(
&mut self,
) -> Result<NoxAlgorithmTuningParameters, Error<E>>
async fn nox_algorithm_tuning_parameters( &mut self, ) -> Result<NoxAlgorithmTuningParameters, Error<E>>
Gets the parameters to customize the NOx algorithm. For more information on what the parameters below do, refer to Sensirion’s NOx Index for Indoor Air Applications.
Source§async fn set_nox_algorithm_tuning_parameters(
&mut self,
tx: NoxAlgorithmTuningParameters,
) -> Result<(), Error<E>>
async fn set_nox_algorithm_tuning_parameters( &mut self, tx: NoxAlgorithmTuningParameters, ) -> Result<(), Error<E>>
Sets the parameters to customize the NOx algorithm. It has no effect if at least one parameter is outside the specified range. To check whether the parameters have been set successfully, use the Get NOx Algorithm Tuning Parameters command. For more information on what the parameters below do, refer to Sensirion’s NOx Index for Indoor Air Applications.
Source§impl<T, E> Sen66Commands<E> for Twhere
T: Sen6xConnection<Sen66, E>,
impl<T, E> Sen66Commands<E> for Twhere
T: Sen6xConnection<Sen66, E>,
Source§fn start_continuous_measurement(&mut self) -> Result<(), Error<E>>
fn start_continuous_measurement(&mut self) -> Result<(), Error<E>>
Starts a continuous measurement. After starting the measurement, it takes some time (~1.1s) until the first measurement results are available. You could poll with the command Get Data Ready to check when the results are ready to be read.
Note: For SEN63C and SEN69C only: SEN63C and SEN69C are conditioning the CO2 sensor during the initial 24 seconds after starting a measurement. As this process cannot be interrupted, the following limitations apply during this period:
- You may stop the measurement if needed, but do not start it again until at least 24 seconds have passed to avoid a CO2-1 – CO2 Sensor Error.
- Do not stop the sensor and use the commands Perform Forced CO2 Recalibration, Set CO2 Sensor Automatic Self Calibration or Perform CO2 Sensor Factory Reset.
Source§fn stop_measurement(&mut self) -> Result<(), Error<E>>
fn stop_measurement(&mut self) -> Result<(), Error<E>>
Stops the measurement and returns to idle mode.
Source§fn data_ready(&mut self) -> Result<DataReady, Error<E>>
fn data_ready(&mut self) -> Result<DataReady, Error<E>>
This command can be used to check if new measurement results are ready to read. The data_ready flag is automatically reset after reading the measurement values.
Source§fn measured_values(&mut self) -> Result<MeasuredValuesSen66, Error<E>>
fn measured_values(&mut self) -> Result<MeasuredValuesSen66, Error<E>>
Returns the measured values. The command data_ready can be used to check if new data is available since the last read operation. If no new data is available, the previous values will be returned. If no data is available at all (e.g. measurement not running for at least one second), all values will be None
Source§fn raw_values(&mut self) -> Result<RawValuesSen66, Error<E>>
fn raw_values(&mut self) -> Result<RawValuesSen66, Error<E>>
Returns the measured raw values. The command data_ready can be used to check if new data is available since the last read operation. If no new data is available, the previous values will be returned. If no data is available at all (e.g. measurement not running for at least one second), all values will be None
Source§fn number_concentration_values(
&mut self,
) -> Result<NumberConcentrationValues, Error<E>>
fn number_concentration_values( &mut self, ) -> Result<NumberConcentrationValues, Error<E>>
Returns the measured number concentration values. The command Get Data Ready can be used to check if new data is available since the last read operation. If no new data is available, the previous values will be returned. If no data is available at all (e.g. measurement not running for at least one second), all values will be None
Source§fn set_temperature_offset_parameters(
&mut self,
tx: TemperatureOffsetParameters,
) -> Result<(), Error<E>>
fn set_temperature_offset_parameters( &mut self, tx: TemperatureOffsetParameters, ) -> Result<(), Error<E>>
This command allows to compensate temperature effects of the design-in at customer side by applying custom temperature offsets to the ambient temperature.
Source§fn set_temperature_acceleration_parameters(
&mut self,
tx: TemperatureAccelerationParameters,
) -> Result<(), Error<E>>
fn set_temperature_acceleration_parameters( &mut self, tx: TemperatureAccelerationParameters, ) -> Result<(), Error<E>>
This command allows to set custom temperature acceleration parameters of the RH/T engine. It overwrites the default temperature acceleration parameters of the RH/T engine with custom values.
Source§fn product_name(&mut self) -> Result<FixedStr<32>, Error<E>>
fn product_name(&mut self) -> Result<FixedStr<32>, Error<E>>
Gets the product name from the device
Source§fn serial_number(&mut self) -> Result<FixedStr<32>, Error<E>>
fn serial_number(&mut self) -> Result<FixedStr<32>, Error<E>>
Gets the serial number from the device.
Source§fn device_status(&mut self) -> Result<DeviceStatus, Error<E>>
fn device_status(&mut self) -> Result<DeviceStatus, Error<E>>
Reads the current device status.
Use this command to get detailed information about the device status. The device status is encoded in flags. Each device status flag represents a single bit in a 32-bit integer value. If more than one error is present, the device status register value is the sum of the corresponding flag values. For details about the available flags, refer to the Device Status Register documentation.
Note: The status flags of type “Error” are sticky, i.e. they are not cleared automatically even if the error condition no longer exists. So, they can only be cleared manually with read_and_clear_device_status or through a reset, either by calling Device Reset or through a power cycle. All other flags are not sticky, i.e. they are cleared automatically if the trigger condition disappears
Source§fn read_and_clear_device_status(&mut self) -> Result<DeviceStatus, Error<E>>
fn read_and_clear_device_status(&mut self) -> Result<DeviceStatus, Error<E>>
Reads the current device status (like command Read device_status) and afterwards clears all flags
Source§fn version(&mut self) -> Result<Version, Error<E>>
fn version(&mut self) -> Result<Version, Error<E>>
Gets the version information for the firmware
Source§fn device_reset(&mut self) -> Result<(), Error<E>>
fn device_reset(&mut self) -> Result<(), Error<E>>
Executes a reset on the device. This has the same effect as a power cycle
Source§fn start_fan_cleaning(&mut self) -> Result<(), Error<E>>
fn start_fan_cleaning(&mut self) -> Result<(), Error<E>>
This command triggers fan cleaning. The fan is set to the maximum speed for 10 seconds and then automatically stopped. Wait at least 10s after this command before starting a measurement.
Source§fn activate_sht_heater(&mut self) -> Result<(), Error<E>>
fn activate_sht_heater(&mut self) -> Result<(), Error<E>>
This command allows you to use the inbuilt heater in SHT sensor to reverse creep at high humidity. This command activates the SHT sensor heater with 200mW for 1s. The heater is then automatically deactivated again. For firmware versions with an Execution Time of 20ms in the table below, the Get SHT Heater Measurements command can be polled to check whether the heating is finished to trigger another cycle to maximize the duty cycle. Older firmware version do not yet support Get SHT Heater Measurements. Wait at least 20s after this command before starting a measurement to get coherent temperature values (heating consequence to disappear).
Source§fn sht_heater_measurements(&mut self) -> Result<ShtHeaterMeasurements, Error<E>>
fn sht_heater_measurements(&mut self) -> Result<ShtHeaterMeasurements, Error<E>>
Get the measurement values when the SHT sensor heating is finished. Note: This command is only available from the Firmware Version specified in the table below. It must be used after the Activate SHT Heater command. The command can be queried every 50ms to check if the heating cycle is finished and measurements are available.
Source§fn voc_algorithm_tuning_parameters(
&mut self,
) -> Result<VocAlgorithmTuningParameters, Error<E>>
fn voc_algorithm_tuning_parameters( &mut self, ) -> Result<VocAlgorithmTuningParameters, Error<E>>
Gets the parameters to customize the VOC algorithm. For more information on what the parameters below do, refer to Sensirion’s VOC Index for Indoor Air Applications.
Source§fn set_voc_algorithm_tuning_parameters(
&mut self,
tx: VocAlgorithmTuningParameters,
) -> Result<(), Error<E>>
fn set_voc_algorithm_tuning_parameters( &mut self, tx: VocAlgorithmTuningParameters, ) -> Result<(), Error<E>>
Sets the parameters to customize the VOC algorithm. It has no effect if at least one parameter is outside the specified range. For more information on what the parameters below do, refer to Sensirion’s VOC Index for Indoor Air Applications.
Source§fn voc_algorithm_state(&mut self) -> Result<VocAlgorithmState, Error<E>>
fn voc_algorithm_state(&mut self) -> Result<VocAlgorithmState, Error<E>>
Allows backup of the VOC algorithm state to resume operation after a power cycle or device reset, skipping initial learning phase. By default, the VOC Engine is reset, and the algorithm state is retained if a measurement is stopped and started again. If the VOC algorithm state shall be reset, a device reset, or a power cycle can be executed.
Source§fn set_voc_algorithm_state(
&mut self,
tx: VocAlgorithmState,
) -> Result<(), Error<E>>
fn set_voc_algorithm_state( &mut self, tx: VocAlgorithmState, ) -> Result<(), Error<E>>
Allows restoration of the VOC algorithm state to resume operation after a power cycle or device reset, skipping initial learning phase. By default, the VOC Engine is reset, and the algorithm state is retained if a measurement is stopped and started again. If the VOC algorithm state shall be reset, a device reset, or a power cycle can be executed. Sets the VOC algorithm state previously received with the Get VOC Algorithm State command. This command is only available in idle mode and the state will be applied only once when starting the next measurement. In measurement mode, this command has no effect.
Source§fn nox_algorithm_tuning_parameters(
&mut self,
) -> Result<NoxAlgorithmTuningParameters, Error<E>>
fn nox_algorithm_tuning_parameters( &mut self, ) -> Result<NoxAlgorithmTuningParameters, Error<E>>
Gets the parameters to customize the NOx algorithm. For more information on what the parameters below do, refer to Sensirion’s NOx Index for Indoor Air Applications.
Source§fn set_nox_algorithm_tuning_parameters(
&mut self,
tx: NoxAlgorithmTuningParameters,
) -> Result<(), Error<E>>
fn set_nox_algorithm_tuning_parameters( &mut self, tx: NoxAlgorithmTuningParameters, ) -> Result<(), Error<E>>
Sets the parameters to customize the NOx algorithm. It has no effect if at least one parameter is outside the specified range. To check whether the parameters have been set successfully, use the Get NOx Algorithm Tuning Parameters command. For more information on what the parameters below do, refer to Sensirion’s NOx Index for Indoor Air Applications.
Source§fn set_perform_forced_co2_recalibration(
&mut self,
tx: PpmU16,
) -> Result<Co2Correction, Error<E>>
fn set_perform_forced_co2_recalibration( &mut self, tx: PpmU16, ) -> Result<Co2Correction, Error<E>>
Execute the forced recalibration (FRC) of the CO2 signal. To successfully conduct an accurate FRC, the following steps need to be taken:
- Start a measurement with the command Start Continuous Measurement and operate the sensor for at least 3 minutes in an environment with homogenous and constant CO2 concentration. If applicable, the reference value for altitude or pressure compensation must be provided to the sensor beforehand with the command Set Sensor Altitude or Set Ambient Pressure respectively.
- Stop the measurement with the command Stop Measurement and wait at least 1400ms.
- Issue the Perform Forced CO2 Recalibration command with the reference CO2 concentration that the sensor should be set to. The recalibration procedure will take about 500 ms to complete, during which time no other functions can be executed. A return value of 0xFFFF indicates that the FRC has failed
Source§fn perform_co2_sensor_factory_reset(&mut self) -> Result<(), Error<E>>
fn perform_co2_sensor_factory_reset(&mut self) -> Result<(), Error<E>>
This command resets all CO2 sensor configuration settings stored in the EEPROM and erases the forced recalibration (FRC) and automatic self-calibration (ASC) algorithm history of the CO2 sensor, restarting the bypass phase. Refer to the STCC4 datasheet for more information.
Source§fn co2_sensor_automatic_self_calibration(&mut self) -> Result<bool, Error<E>>
fn co2_sensor_automatic_self_calibration(&mut self) -> Result<bool, Error<E>>
Gets the status of the CO2 sensor automatic self-calibration (ASC). The CO2 sensor supports automatic self-calibration (ASC) for long-term stability of the CO2 output. This feature can be enabled or disabled. By default, it is enabled.
Source§fn set_co2_sensor_automatic_self_calibration(
&mut self,
tx: bool,
) -> Result<(), Error<E>>
fn set_co2_sensor_automatic_self_calibration( &mut self, tx: bool, ) -> Result<(), Error<E>>
Sets the status of the CO2 sensor automatic self-calibration (ASC). The CO2 sensor supports automatic self-calibration (ASC) for long-term stability of the CO2 output. This feature can be enabled or disabled. By default, it is enabled. The automatic self-calibration can be disabled for testing under lab conditions where concentrations below 400ppm are expected, to avoid an alteration of the baseline. In the field, ASC must be enabled and exposure to fresh air (i.e. CO2 concentration at 400 ppm) at least once per week is required to reach datasheet specifications
Source§fn ambient_pressure(&mut self) -> Result<Hpa, Error<E>>
fn ambient_pressure(&mut self) -> Result<Hpa, Error<E>>
Gets the ambient pressure value that was set with Set Ambient Pressure. The ambient pressure can be used for pressure compensation in the CO2 sensor
Source§fn set_ambient_pressure(&mut self, tx: Hpa) -> Result<(), Error<E>>
fn set_ambient_pressure(&mut self, tx: Hpa) -> Result<(), Error<E>>
Sets the ambient pressure value. The ambient pressure can be used for pressure compensation in the CO2 sensor. Setting an ambient pressure overrides any pressure compensation based on a previously set sensor altitude. Use of this command is recommended for applications experiencing significant ambient pressure changes to ensure CO2 sensor accuracy. Valid input values are between 700 to 1’200 hPa. The default value is 1013 hPa.
Source§fn sensor_altitude(&mut self) -> Result<Meters, Error<E>>
fn sensor_altitude(&mut self) -> Result<Meters, Error<E>>
Gets the current sensor altitude. The sensor altitude can be used for pressure compensation in the CO2 sensor.
Source§fn set_sensor_altitude(&mut self, tx: Meters) -> Result<(), Error<E>>
fn set_sensor_altitude(&mut self, tx: Meters) -> Result<(), Error<E>>
Sets the current sensor altitude. The sensor altitude can be used for pressure compensation in the CO2 sensor. The default sensor altitude value is set to 0 meters above sea level. Valid input values are between 0 and 3000m.
Source§impl<T, E> Sen66CommandsAsync<E> for Twhere
T: Sen6xConnection<Sen66, E>,
impl<T, E> Sen66CommandsAsync<E> for Twhere
T: Sen6xConnection<Sen66, E>,
Source§async fn start_continuous_measurement(&mut self) -> Result<(), Error<E>>
async fn start_continuous_measurement(&mut self) -> Result<(), Error<E>>
Starts a continuous measurement. After starting the measurement, it takes some time (~1.1s) until the first measurement results are available. You could poll with the command Get Data Ready to check when the results are ready to be read.
Note: For SEN63C and SEN69C only: SEN63C and SEN69C are conditioning the CO2 sensor during the initial 24 seconds after starting a measurement. As this process cannot be interrupted, the following limitations apply during this period:
- You may stop the measurement if needed, but do not start it again until at least 24 seconds have passed to avoid a CO2-1 – CO2 Sensor Error.
- Do not stop the sensor and use the commands Perform Forced CO2 Recalibration, Set CO2 Sensor Automatic Self Calibration or Perform CO2 Sensor Factory Reset.
Source§async fn stop_measurement(&mut self) -> Result<(), Error<E>>
async fn stop_measurement(&mut self) -> Result<(), Error<E>>
Stops the measurement and returns to idle mode.
Source§async fn data_ready(&mut self) -> Result<DataReady, Error<E>>
async fn data_ready(&mut self) -> Result<DataReady, Error<E>>
This command can be used to check if new measurement results are ready to read. The data_ready flag is automatically reset after reading the measurement values.
Source§async fn measured_values(&mut self) -> Result<MeasuredValuesSen66, Error<E>>
async fn measured_values(&mut self) -> Result<MeasuredValuesSen66, Error<E>>
Returns the measured values. The command data_ready can be used to check if new data is available since the last read operation. If no new data is available, the previous values will be returned. If no data is available at all (e.g. measurement not running for at least one second), all values will be None
Source§async fn raw_values(&mut self) -> Result<RawValuesSen66, Error<E>>
async fn raw_values(&mut self) -> Result<RawValuesSen66, Error<E>>
Returns the measured raw values. The command data_ready can be used to check if new data is available since the last read operation. If no new data is available, the previous values will be returned. If no data is available at all (e.g. measurement not running for at least one second), all values will be None
Source§async fn number_concentration_values(
&mut self,
) -> Result<NumberConcentrationValues, Error<E>>
async fn number_concentration_values( &mut self, ) -> Result<NumberConcentrationValues, Error<E>>
Returns the measured number concentration values. The command Get Data Ready can be used to check if new data is available since the last read operation. If no new data is available, the previous values will be returned. If no data is available at all (e.g. measurement not running for at least one second), all values will be None
Source§async fn set_temperature_offset_parameters(
&mut self,
tx: TemperatureOffsetParameters,
) -> Result<(), Error<E>>
async fn set_temperature_offset_parameters( &mut self, tx: TemperatureOffsetParameters, ) -> Result<(), Error<E>>
This command allows to compensate temperature effects of the design-in at customer side by applying custom temperature offsets to the ambient temperature.
Source§async fn set_temperature_acceleration_parameters(
&mut self,
tx: TemperatureAccelerationParameters,
) -> Result<(), Error<E>>
async fn set_temperature_acceleration_parameters( &mut self, tx: TemperatureAccelerationParameters, ) -> Result<(), Error<E>>
This command allows to set custom temperature acceleration parameters of the RH/T engine. It overwrites the default temperature acceleration parameters of the RH/T engine with custom values.
Source§async fn product_name(&mut self) -> Result<FixedStr<32>, Error<E>>
async fn product_name(&mut self) -> Result<FixedStr<32>, Error<E>>
Gets the product name from the device
Source§async fn serial_number(&mut self) -> Result<FixedStr<32>, Error<E>>
async fn serial_number(&mut self) -> Result<FixedStr<32>, Error<E>>
Gets the serial number from the device.
Source§async fn device_status(&mut self) -> Result<DeviceStatus, Error<E>>
async fn device_status(&mut self) -> Result<DeviceStatus, Error<E>>
Reads the current device status.
Use this command to get detailed information about the device status. The device status is encoded in flags. Each device status flag represents a single bit in a 32-bit integer value. If more than one error is present, the device status register value is the sum of the corresponding flag values. For details about the available flags, refer to the Device Status Register documentation.
Note: The status flags of type “Error” are sticky, i.e. they are not cleared automatically even if the error condition no longer exists. So, they can only be cleared manually with read_and_clear_device_status or through a reset, either by calling Device Reset or through a power cycle. All other flags are not sticky, i.e. they are cleared automatically if the trigger condition disappears
Source§async fn read_and_clear_device_status(
&mut self,
) -> Result<DeviceStatus, Error<E>>
async fn read_and_clear_device_status( &mut self, ) -> Result<DeviceStatus, Error<E>>
Reads the current device status (like command Read device_status) and afterwards clears all flags
Source§async fn version(&mut self) -> Result<Version, Error<E>>
async fn version(&mut self) -> Result<Version, Error<E>>
Gets the version information for the firmware
Source§async fn device_reset(&mut self) -> Result<(), Error<E>>
async fn device_reset(&mut self) -> Result<(), Error<E>>
Executes a reset on the device. This has the same effect as a power cycle
Source§async fn start_fan_cleaning(&mut self) -> Result<(), Error<E>>
async fn start_fan_cleaning(&mut self) -> Result<(), Error<E>>
This command triggers fan cleaning. The fan is set to the maximum speed for 10 seconds and then automatically stopped. Wait at least 10s after this command before starting a measurement.
Source§async fn activate_sht_heater(&mut self) -> Result<(), Error<E>>
async fn activate_sht_heater(&mut self) -> Result<(), Error<E>>
This command allows you to use the inbuilt heater in SHT sensor to reverse creep at high humidity. This command activates the SHT sensor heater with 200mW for 1s. The heater is then automatically deactivated again. For firmware versions with an Execution Time of 20ms in the table below, the Get SHT Heater Measurements command can be polled to check whether the heating is finished to trigger another cycle to maximize the duty cycle. Older firmware version do not yet support Get SHT Heater Measurements. Wait at least 20s after this command before starting a measurement to get coherent temperature values (heating consequence to disappear).
Source§async fn sht_heater_measurements(
&mut self,
) -> Result<ShtHeaterMeasurements, Error<E>>
async fn sht_heater_measurements( &mut self, ) -> Result<ShtHeaterMeasurements, Error<E>>
Get the measurement values when the SHT sensor heating is finished. Note: This command is only available from the Firmware Version specified in the table below. It must be used after the Activate SHT Heater command. The command can be queried every 50ms to check if the heating cycle is finished and measurements are available.
Source§async fn voc_algorithm_tuning_parameters(
&mut self,
) -> Result<VocAlgorithmTuningParameters, Error<E>>
async fn voc_algorithm_tuning_parameters( &mut self, ) -> Result<VocAlgorithmTuningParameters, Error<E>>
Gets the parameters to customize the VOC algorithm. For more information on what the parameters below do, refer to Sensirion’s VOC Index for Indoor Air Applications.
Source§async fn set_voc_algorithm_tuning_parameters(
&mut self,
tx: VocAlgorithmTuningParameters,
) -> Result<(), Error<E>>
async fn set_voc_algorithm_tuning_parameters( &mut self, tx: VocAlgorithmTuningParameters, ) -> Result<(), Error<E>>
Sets the parameters to customize the VOC algorithm. It has no effect if at least one parameter is outside the specified range. For more information on what the parameters below do, refer to Sensirion’s VOC Index for Indoor Air Applications.
Source§async fn voc_algorithm_state(&mut self) -> Result<VocAlgorithmState, Error<E>>
async fn voc_algorithm_state(&mut self) -> Result<VocAlgorithmState, Error<E>>
Allows backup of the VOC algorithm state to resume operation after a power cycle or device reset, skipping initial learning phase. By default, the VOC Engine is reset, and the algorithm state is retained if a measurement is stopped and started again. If the VOC algorithm state shall be reset, a device reset, or a power cycle can be executed.
Source§async fn set_voc_algorithm_state(
&mut self,
tx: VocAlgorithmState,
) -> Result<(), Error<E>>
async fn set_voc_algorithm_state( &mut self, tx: VocAlgorithmState, ) -> Result<(), Error<E>>
Allows restoration of the VOC algorithm state to resume operation after a power cycle or device reset, skipping initial learning phase. By default, the VOC Engine is reset, and the algorithm state is retained if a measurement is stopped and started again. If the VOC algorithm state shall be reset, a device reset, or a power cycle can be executed. Sets the VOC algorithm state previously received with the Get VOC Algorithm State command. This command is only available in idle mode and the state will be applied only once when starting the next measurement. In measurement mode, this command has no effect.
Source§async fn nox_algorithm_tuning_parameters(
&mut self,
) -> Result<NoxAlgorithmTuningParameters, Error<E>>
async fn nox_algorithm_tuning_parameters( &mut self, ) -> Result<NoxAlgorithmTuningParameters, Error<E>>
Gets the parameters to customize the NOx algorithm. For more information on what the parameters below do, refer to Sensirion’s NOx Index for Indoor Air Applications.
Source§async fn set_nox_algorithm_tuning_parameters(
&mut self,
tx: NoxAlgorithmTuningParameters,
) -> Result<(), Error<E>>
async fn set_nox_algorithm_tuning_parameters( &mut self, tx: NoxAlgorithmTuningParameters, ) -> Result<(), Error<E>>
Sets the parameters to customize the NOx algorithm. It has no effect if at least one parameter is outside the specified range. To check whether the parameters have been set successfully, use the Get NOx Algorithm Tuning Parameters command. For more information on what the parameters below do, refer to Sensirion’s NOx Index for Indoor Air Applications.
Source§async fn set_perform_forced_co2_recalibration(
&mut self,
tx: PpmU16,
) -> Result<Co2Correction, Error<E>>
async fn set_perform_forced_co2_recalibration( &mut self, tx: PpmU16, ) -> Result<Co2Correction, Error<E>>
Execute the forced recalibration (FRC) of the CO2 signal. To successfully conduct an accurate FRC, the following steps need to be taken:
- Start a measurement with the command Start Continuous Measurement and operate the sensor for at least 3 minutes in an environment with homogenous and constant CO2 concentration. If applicable, the reference value for altitude or pressure compensation must be provided to the sensor beforehand with the command Set Sensor Altitude or Set Ambient Pressure respectively.
- Stop the measurement with the command Stop Measurement and wait at least 1400ms.
- Issue the Perform Forced CO2 Recalibration command with the reference CO2 concentration that the sensor should be set to. The recalibration procedure will take about 500 ms to complete, during which time no other functions can be executed. A return value of 0xFFFF indicates that the FRC has failed
Source§async fn perform_co2_sensor_factory_reset(&mut self) -> Result<(), Error<E>>
async fn perform_co2_sensor_factory_reset(&mut self) -> Result<(), Error<E>>
This command resets all CO2 sensor configuration settings stored in the EEPROM and erases the forced recalibration (FRC) and automatic self-calibration (ASC) algorithm history of the CO2 sensor, restarting the bypass phase. Refer to the STCC4 datasheet for more information.
Source§async fn co2_sensor_automatic_self_calibration(
&mut self,
) -> Result<bool, Error<E>>
async fn co2_sensor_automatic_self_calibration( &mut self, ) -> Result<bool, Error<E>>
Gets the status of the CO2 sensor automatic self-calibration (ASC). The CO2 sensor supports automatic self-calibration (ASC) for long-term stability of the CO2 output. This feature can be enabled or disabled. By default, it is enabled.
Source§async fn set_co2_sensor_automatic_self_calibration(
&mut self,
tx: bool,
) -> Result<(), Error<E>>
async fn set_co2_sensor_automatic_self_calibration( &mut self, tx: bool, ) -> Result<(), Error<E>>
Sets the status of the CO2 sensor automatic self-calibration (ASC). The CO2 sensor supports automatic self-calibration (ASC) for long-term stability of the CO2 output. This feature can be enabled or disabled. By default, it is enabled. The automatic self-calibration can be disabled for testing under lab conditions where concentrations below 400ppm are expected, to avoid an alteration of the baseline. In the field, ASC must be enabled and exposure to fresh air (i.e. CO2 concentration at 400 ppm) at least once per week is required to reach datasheet specifications
Source§async fn ambient_pressure(&mut self) -> Result<Hpa, Error<E>>
async fn ambient_pressure(&mut self) -> Result<Hpa, Error<E>>
Gets the ambient pressure value that was set with Set Ambient Pressure. The ambient pressure can be used for pressure compensation in the CO2 sensor
Source§async fn set_ambient_pressure(&mut self, tx: Hpa) -> Result<(), Error<E>>
async fn set_ambient_pressure(&mut self, tx: Hpa) -> Result<(), Error<E>>
Sets the ambient pressure value. The ambient pressure can be used for pressure compensation in the CO2 sensor. Setting an ambient pressure overrides any pressure compensation based on a previously set sensor altitude. Use of this command is recommended for applications experiencing significant ambient pressure changes to ensure CO2 sensor accuracy. Valid input values are between 700 to 1’200 hPa. The default value is 1013 hPa.
Source§async fn sensor_altitude(&mut self) -> Result<Meters, Error<E>>
async fn sensor_altitude(&mut self) -> Result<Meters, Error<E>>
Gets the current sensor altitude. The sensor altitude can be used for pressure compensation in the CO2 sensor.
Source§async fn set_sensor_altitude(&mut self, tx: Meters) -> Result<(), Error<E>>
async fn set_sensor_altitude(&mut self, tx: Meters) -> Result<(), Error<E>>
Sets the current sensor altitude. The sensor altitude can be used for pressure compensation in the CO2 sensor. The default sensor altitude value is set to 0 meters above sea level. Valid input values are between 0 and 3000m.
Source§impl<T, E> Sen68Commands<E> for Twhere
T: Sen6xConnection<Sen68, E>,
impl<T, E> Sen68Commands<E> for Twhere
T: Sen6xConnection<Sen68, E>,
Source§fn start_continuous_measurement(&mut self) -> Result<(), Error<E>>
fn start_continuous_measurement(&mut self) -> Result<(), Error<E>>
Starts a continuous measurement. After starting the measurement, it takes some time (~1.1s) until the first measurement results are available. You could poll with the command Get Data Ready to check when the results are ready to be read.
Note: For SEN63C and SEN69C only: SEN63C and SEN69C are conditioning the CO2 sensor during the initial 24 seconds after starting a measurement. As this process cannot be interrupted, the following limitations apply during this period:
- You may stop the measurement if needed, but do not start it again until at least 24 seconds have passed to avoid a CO2-1 – CO2 Sensor Error.
- Do not stop the sensor and use the commands Perform Forced CO2 Recalibration, Set CO2 Sensor Automatic Self Calibration or Perform CO2 Sensor Factory Reset.
Source§fn stop_measurement(&mut self) -> Result<(), Error<E>>
fn stop_measurement(&mut self) -> Result<(), Error<E>>
Stops the measurement and returns to idle mode.
Source§fn data_ready(&mut self) -> Result<DataReady, Error<E>>
fn data_ready(&mut self) -> Result<DataReady, Error<E>>
This command can be used to check if new measurement results are ready to read. The data_ready flag is automatically reset after reading the measurement values.
Source§fn measured_values(&mut self) -> Result<MeasuredValuesSen68, Error<E>>
fn measured_values(&mut self) -> Result<MeasuredValuesSen68, Error<E>>
Returns the measured values. The command data_ready can be used to check if new data is available since the last read operation. If no new data is available, the previous values will be returned. If no data is available at all (e.g. measurement not running for at least one second), all values will be None
Source§fn raw_values(&mut self) -> Result<RawValuesSen65Sen68Sen69c, Error<E>>
fn raw_values(&mut self) -> Result<RawValuesSen65Sen68Sen69c, Error<E>>
Returns the measured raw values. The command data_ready can be used to check if new data is available since the last read operation. If no new data is available, the previous values will be returned. If no data is available at all (e.g. measurement not running for at least one second), all values will be None
Source§fn number_concentration_values(
&mut self,
) -> Result<NumberConcentrationValues, Error<E>>
fn number_concentration_values( &mut self, ) -> Result<NumberConcentrationValues, Error<E>>
Returns the measured number concentration values. The command Get Data Ready can be used to check if new data is available since the last read operation. If no new data is available, the previous values will be returned. If no data is available at all (e.g. measurement not running for at least one second), all values will be None
Source§fn set_temperature_offset_parameters(
&mut self,
tx: TemperatureOffsetParameters,
) -> Result<(), Error<E>>
fn set_temperature_offset_parameters( &mut self, tx: TemperatureOffsetParameters, ) -> Result<(), Error<E>>
This command allows to compensate temperature effects of the design-in at customer side by applying custom temperature offsets to the ambient temperature.
Source§fn set_temperature_acceleration_parameters(
&mut self,
tx: TemperatureAccelerationParameters,
) -> Result<(), Error<E>>
fn set_temperature_acceleration_parameters( &mut self, tx: TemperatureAccelerationParameters, ) -> Result<(), Error<E>>
This command allows to set custom temperature acceleration parameters of the RH/T engine. It overwrites the default temperature acceleration parameters of the RH/T engine with custom values.
Source§fn product_name(&mut self) -> Result<FixedStr<32>, Error<E>>
fn product_name(&mut self) -> Result<FixedStr<32>, Error<E>>
Gets the product name from the device
Source§fn serial_number(&mut self) -> Result<FixedStr<32>, Error<E>>
fn serial_number(&mut self) -> Result<FixedStr<32>, Error<E>>
Gets the serial number from the device.
Source§fn device_status(&mut self) -> Result<DeviceStatus, Error<E>>
fn device_status(&mut self) -> Result<DeviceStatus, Error<E>>
Reads the current device status.
Use this command to get detailed information about the device status. The device status is encoded in flags. Each device status flag represents a single bit in a 32-bit integer value. If more than one error is present, the device status register value is the sum of the corresponding flag values. For details about the available flags, refer to the Device Status Register documentation.
Note: The status flags of type “Error” are sticky, i.e. they are not cleared automatically even if the error condition no longer exists. So, they can only be cleared manually with read_and_clear_device_status or through a reset, either by calling Device Reset or through a power cycle. All other flags are not sticky, i.e. they are cleared automatically if the trigger condition disappears
Source§fn read_and_clear_device_status(&mut self) -> Result<DeviceStatus, Error<E>>
fn read_and_clear_device_status(&mut self) -> Result<DeviceStatus, Error<E>>
Reads the current device status (like command Read device_status) and afterwards clears all flags
Source§fn version(&mut self) -> Result<Version, Error<E>>
fn version(&mut self) -> Result<Version, Error<E>>
Gets the version information for the firmware
Source§fn device_reset(&mut self) -> Result<(), Error<E>>
fn device_reset(&mut self) -> Result<(), Error<E>>
Executes a reset on the device. This has the same effect as a power cycle
Source§fn start_fan_cleaning(&mut self) -> Result<(), Error<E>>
fn start_fan_cleaning(&mut self) -> Result<(), Error<E>>
This command triggers fan cleaning. The fan is set to the maximum speed for 10 seconds and then automatically stopped. Wait at least 10s after this command before starting a measurement.
Source§fn activate_sht_heater(&mut self) -> Result<(), Error<E>>
fn activate_sht_heater(&mut self) -> Result<(), Error<E>>
This command allows you to use the inbuilt heater in SHT sensor to reverse creep at high humidity. This command activates the SHT sensor heater with 200mW for 1s. The heater is then automatically deactivated again. For firmware versions with an Execution Time of 20ms in the table below, the Get SHT Heater Measurements command can be polled to check whether the heating is finished to trigger another cycle to maximize the duty cycle. Older firmware version do not yet support Get SHT Heater Measurements. Wait at least 20s after this command before starting a measurement to get coherent temperature values (heating consequence to disappear).
Source§fn sht_heater_measurements(&mut self) -> Result<ShtHeaterMeasurements, Error<E>>
fn sht_heater_measurements(&mut self) -> Result<ShtHeaterMeasurements, Error<E>>
Get the measurement values when the SHT sensor heating is finished. Note: This command is only available from the Firmware Version specified in the table below. It must be used after the Activate SHT Heater command. The command can be queried every 50ms to check if the heating cycle is finished and measurements are available.
Source§fn voc_algorithm_tuning_parameters(
&mut self,
) -> Result<VocAlgorithmTuningParameters, Error<E>>
fn voc_algorithm_tuning_parameters( &mut self, ) -> Result<VocAlgorithmTuningParameters, Error<E>>
Gets the parameters to customize the VOC algorithm. For more information on what the parameters below do, refer to Sensirion’s VOC Index for Indoor Air Applications.
Source§fn set_voc_algorithm_tuning_parameters(
&mut self,
tx: VocAlgorithmTuningParameters,
) -> Result<(), Error<E>>
fn set_voc_algorithm_tuning_parameters( &mut self, tx: VocAlgorithmTuningParameters, ) -> Result<(), Error<E>>
Sets the parameters to customize the VOC algorithm. It has no effect if at least one parameter is outside the specified range. For more information on what the parameters below do, refer to Sensirion’s VOC Index for Indoor Air Applications.
Source§fn voc_algorithm_state(&mut self) -> Result<VocAlgorithmState, Error<E>>
fn voc_algorithm_state(&mut self) -> Result<VocAlgorithmState, Error<E>>
Allows backup of the VOC algorithm state to resume operation after a power cycle or device reset, skipping initial learning phase. By default, the VOC Engine is reset, and the algorithm state is retained if a measurement is stopped and started again. If the VOC algorithm state shall be reset, a device reset, or a power cycle can be executed.
Source§fn set_voc_algorithm_state(
&mut self,
tx: VocAlgorithmState,
) -> Result<(), Error<E>>
fn set_voc_algorithm_state( &mut self, tx: VocAlgorithmState, ) -> Result<(), Error<E>>
Allows restoration of the VOC algorithm state to resume operation after a power cycle or device reset, skipping initial learning phase. By default, the VOC Engine is reset, and the algorithm state is retained if a measurement is stopped and started again. If the VOC algorithm state shall be reset, a device reset, or a power cycle can be executed. Sets the VOC algorithm state previously received with the Get VOC Algorithm State command. This command is only available in idle mode and the state will be applied only once when starting the next measurement. In measurement mode, this command has no effect.
Source§fn nox_algorithm_tuning_parameters(
&mut self,
) -> Result<NoxAlgorithmTuningParameters, Error<E>>
fn nox_algorithm_tuning_parameters( &mut self, ) -> Result<NoxAlgorithmTuningParameters, Error<E>>
Gets the parameters to customize the NOx algorithm. For more information on what the parameters below do, refer to Sensirion’s NOx Index for Indoor Air Applications.
Source§fn set_nox_algorithm_tuning_parameters(
&mut self,
tx: NoxAlgorithmTuningParameters,
) -> Result<(), Error<E>>
fn set_nox_algorithm_tuning_parameters( &mut self, tx: NoxAlgorithmTuningParameters, ) -> Result<(), Error<E>>
Sets the parameters to customize the NOx algorithm. It has no effect if at least one parameter is outside the specified range. To check whether the parameters have been set successfully, use the Get NOx Algorithm Tuning Parameters command. For more information on what the parameters below do, refer to Sensirion’s NOx Index for Indoor Air Applications.
Source§impl<T, E> Sen68CommandsAsync<E> for Twhere
T: Sen6xConnection<Sen68, E>,
impl<T, E> Sen68CommandsAsync<E> for Twhere
T: Sen6xConnection<Sen68, E>,
Source§async fn start_continuous_measurement(&mut self) -> Result<(), Error<E>>
async fn start_continuous_measurement(&mut self) -> Result<(), Error<E>>
Starts a continuous measurement. After starting the measurement, it takes some time (~1.1s) until the first measurement results are available. You could poll with the command Get Data Ready to check when the results are ready to be read.
Note: For SEN63C and SEN69C only: SEN63C and SEN69C are conditioning the CO2 sensor during the initial 24 seconds after starting a measurement. As this process cannot be interrupted, the following limitations apply during this period:
- You may stop the measurement if needed, but do not start it again until at least 24 seconds have passed to avoid a CO2-1 – CO2 Sensor Error.
- Do not stop the sensor and use the commands Perform Forced CO2 Recalibration, Set CO2 Sensor Automatic Self Calibration or Perform CO2 Sensor Factory Reset.
Source§async fn stop_measurement(&mut self) -> Result<(), Error<E>>
async fn stop_measurement(&mut self) -> Result<(), Error<E>>
Stops the measurement and returns to idle mode.
Source§async fn data_ready(&mut self) -> Result<DataReady, Error<E>>
async fn data_ready(&mut self) -> Result<DataReady, Error<E>>
This command can be used to check if new measurement results are ready to read. The data_ready flag is automatically reset after reading the measurement values.
Source§async fn measured_values(&mut self) -> Result<MeasuredValuesSen68, Error<E>>
async fn measured_values(&mut self) -> Result<MeasuredValuesSen68, Error<E>>
Returns the measured values. The command data_ready can be used to check if new data is available since the last read operation. If no new data is available, the previous values will be returned. If no data is available at all (e.g. measurement not running for at least one second), all values will be None
Source§async fn raw_values(&mut self) -> Result<RawValuesSen65Sen68Sen69c, Error<E>>
async fn raw_values(&mut self) -> Result<RawValuesSen65Sen68Sen69c, Error<E>>
Returns the measured raw values. The command data_ready can be used to check if new data is available since the last read operation. If no new data is available, the previous values will be returned. If no data is available at all (e.g. measurement not running for at least one second), all values will be None
Source§async fn number_concentration_values(
&mut self,
) -> Result<NumberConcentrationValues, Error<E>>
async fn number_concentration_values( &mut self, ) -> Result<NumberConcentrationValues, Error<E>>
Returns the measured number concentration values. The command Get Data Ready can be used to check if new data is available since the last read operation. If no new data is available, the previous values will be returned. If no data is available at all (e.g. measurement not running for at least one second), all values will be None
Source§async fn set_temperature_offset_parameters(
&mut self,
tx: TemperatureOffsetParameters,
) -> Result<(), Error<E>>
async fn set_temperature_offset_parameters( &mut self, tx: TemperatureOffsetParameters, ) -> Result<(), Error<E>>
This command allows to compensate temperature effects of the design-in at customer side by applying custom temperature offsets to the ambient temperature.
Source§async fn set_temperature_acceleration_parameters(
&mut self,
tx: TemperatureAccelerationParameters,
) -> Result<(), Error<E>>
async fn set_temperature_acceleration_parameters( &mut self, tx: TemperatureAccelerationParameters, ) -> Result<(), Error<E>>
This command allows to set custom temperature acceleration parameters of the RH/T engine. It overwrites the default temperature acceleration parameters of the RH/T engine with custom values.
Source§async fn product_name(&mut self) -> Result<FixedStr<32>, Error<E>>
async fn product_name(&mut self) -> Result<FixedStr<32>, Error<E>>
Gets the product name from the device
Source§async fn serial_number(&mut self) -> Result<FixedStr<32>, Error<E>>
async fn serial_number(&mut self) -> Result<FixedStr<32>, Error<E>>
Gets the serial number from the device.
Source§async fn device_status(&mut self) -> Result<DeviceStatus, Error<E>>
async fn device_status(&mut self) -> Result<DeviceStatus, Error<E>>
Reads the current device status.
Use this command to get detailed information about the device status. The device status is encoded in flags. Each device status flag represents a single bit in a 32-bit integer value. If more than one error is present, the device status register value is the sum of the corresponding flag values. For details about the available flags, refer to the Device Status Register documentation.
Note: The status flags of type “Error” are sticky, i.e. they are not cleared automatically even if the error condition no longer exists. So, they can only be cleared manually with read_and_clear_device_status or through a reset, either by calling Device Reset or through a power cycle. All other flags are not sticky, i.e. they are cleared automatically if the trigger condition disappears
Source§async fn read_and_clear_device_status(
&mut self,
) -> Result<DeviceStatus, Error<E>>
async fn read_and_clear_device_status( &mut self, ) -> Result<DeviceStatus, Error<E>>
Reads the current device status (like command Read device_status) and afterwards clears all flags
Source§async fn version(&mut self) -> Result<Version, Error<E>>
async fn version(&mut self) -> Result<Version, Error<E>>
Gets the version information for the firmware
Source§async fn device_reset(&mut self) -> Result<(), Error<E>>
async fn device_reset(&mut self) -> Result<(), Error<E>>
Executes a reset on the device. This has the same effect as a power cycle
Source§async fn start_fan_cleaning(&mut self) -> Result<(), Error<E>>
async fn start_fan_cleaning(&mut self) -> Result<(), Error<E>>
This command triggers fan cleaning. The fan is set to the maximum speed for 10 seconds and then automatically stopped. Wait at least 10s after this command before starting a measurement.
Source§async fn activate_sht_heater(&mut self) -> Result<(), Error<E>>
async fn activate_sht_heater(&mut self) -> Result<(), Error<E>>
This command allows you to use the inbuilt heater in SHT sensor to reverse creep at high humidity. This command activates the SHT sensor heater with 200mW for 1s. The heater is then automatically deactivated again. For firmware versions with an Execution Time of 20ms in the table below, the Get SHT Heater Measurements command can be polled to check whether the heating is finished to trigger another cycle to maximize the duty cycle. Older firmware version do not yet support Get SHT Heater Measurements. Wait at least 20s after this command before starting a measurement to get coherent temperature values (heating consequence to disappear).
Source§async fn sht_heater_measurements(
&mut self,
) -> Result<ShtHeaterMeasurements, Error<E>>
async fn sht_heater_measurements( &mut self, ) -> Result<ShtHeaterMeasurements, Error<E>>
Get the measurement values when the SHT sensor heating is finished. Note: This command is only available from the Firmware Version specified in the table below. It must be used after the Activate SHT Heater command. The command can be queried every 50ms to check if the heating cycle is finished and measurements are available.
Source§async fn voc_algorithm_tuning_parameters(
&mut self,
) -> Result<VocAlgorithmTuningParameters, Error<E>>
async fn voc_algorithm_tuning_parameters( &mut self, ) -> Result<VocAlgorithmTuningParameters, Error<E>>
Gets the parameters to customize the VOC algorithm. For more information on what the parameters below do, refer to Sensirion’s VOC Index for Indoor Air Applications.
Source§async fn set_voc_algorithm_tuning_parameters(
&mut self,
tx: VocAlgorithmTuningParameters,
) -> Result<(), Error<E>>
async fn set_voc_algorithm_tuning_parameters( &mut self, tx: VocAlgorithmTuningParameters, ) -> Result<(), Error<E>>
Sets the parameters to customize the VOC algorithm. It has no effect if at least one parameter is outside the specified range. For more information on what the parameters below do, refer to Sensirion’s VOC Index for Indoor Air Applications.
Source§async fn voc_algorithm_state(&mut self) -> Result<VocAlgorithmState, Error<E>>
async fn voc_algorithm_state(&mut self) -> Result<VocAlgorithmState, Error<E>>
Allows backup of the VOC algorithm state to resume operation after a power cycle or device reset, skipping initial learning phase. By default, the VOC Engine is reset, and the algorithm state is retained if a measurement is stopped and started again. If the VOC algorithm state shall be reset, a device reset, or a power cycle can be executed.
Source§async fn set_voc_algorithm_state(
&mut self,
tx: VocAlgorithmState,
) -> Result<(), Error<E>>
async fn set_voc_algorithm_state( &mut self, tx: VocAlgorithmState, ) -> Result<(), Error<E>>
Allows restoration of the VOC algorithm state to resume operation after a power cycle or device reset, skipping initial learning phase. By default, the VOC Engine is reset, and the algorithm state is retained if a measurement is stopped and started again. If the VOC algorithm state shall be reset, a device reset, or a power cycle can be executed. Sets the VOC algorithm state previously received with the Get VOC Algorithm State command. This command is only available in idle mode and the state will be applied only once when starting the next measurement. In measurement mode, this command has no effect.
Source§async fn nox_algorithm_tuning_parameters(
&mut self,
) -> Result<NoxAlgorithmTuningParameters, Error<E>>
async fn nox_algorithm_tuning_parameters( &mut self, ) -> Result<NoxAlgorithmTuningParameters, Error<E>>
Gets the parameters to customize the NOx algorithm. For more information on what the parameters below do, refer to Sensirion’s NOx Index for Indoor Air Applications.
Source§async fn set_nox_algorithm_tuning_parameters(
&mut self,
tx: NoxAlgorithmTuningParameters,
) -> Result<(), Error<E>>
async fn set_nox_algorithm_tuning_parameters( &mut self, tx: NoxAlgorithmTuningParameters, ) -> Result<(), Error<E>>
Sets the parameters to customize the NOx algorithm. It has no effect if at least one parameter is outside the specified range. To check whether the parameters have been set successfully, use the Get NOx Algorithm Tuning Parameters command. For more information on what the parameters below do, refer to Sensirion’s NOx Index for Indoor Air Applications.
Source§impl<T, E> Sen69cCommands<E> for Twhere
T: Sen6xConnection<Sen69c, E>,
impl<T, E> Sen69cCommands<E> for Twhere
T: Sen6xConnection<Sen69c, E>,
Source§fn start_continuous_measurement(&mut self) -> Result<(), Error<E>>
fn start_continuous_measurement(&mut self) -> Result<(), Error<E>>
Starts a continuous measurement. After starting the measurement, it takes some time (~1.1s) until the first measurement results are available. You could poll with the command Get Data Ready to check when the results are ready to be read.
Note: For SEN63C and SEN69C only: SEN63C and SEN69C are conditioning the CO2 sensor during the initial 24 seconds after starting a measurement. As this process cannot be interrupted, the following limitations apply during this period:
- You may stop the measurement if needed, but do not start it again until at least 24 seconds have passed to avoid a CO2-1 – CO2 Sensor Error.
- Do not stop the sensor and use the commands Perform Forced CO2 Recalibration, Set CO2 Sensor Automatic Self Calibration or Perform CO2 Sensor Factory Reset.
Source§fn stop_measurement(&mut self) -> Result<(), Error<E>>
fn stop_measurement(&mut self) -> Result<(), Error<E>>
Stops the measurement and returns to idle mode.
Source§fn data_ready(&mut self) -> Result<DataReady, Error<E>>
fn data_ready(&mut self) -> Result<DataReady, Error<E>>
This command can be used to check if new measurement results are ready to read. The data_ready flag is automatically reset after reading the measurement values.
Source§fn measured_values(&mut self) -> Result<MeasuredValuesSen69c, Error<E>>
fn measured_values(&mut self) -> Result<MeasuredValuesSen69c, Error<E>>
Returns the measured values. The command data_ready can be used to check if new data is available since the last read operation. If no new data is available, the previous values will be returned. If no data is available at all (e.g. measurement not running for at least one second), all values will be None
Source§fn raw_values(&mut self) -> Result<RawValuesSen65Sen68Sen69c, Error<E>>
fn raw_values(&mut self) -> Result<RawValuesSen65Sen68Sen69c, Error<E>>
Returns the measured raw values. The command data_ready can be used to check if new data is available since the last read operation. If no new data is available, the previous values will be returned. If no data is available at all (e.g. measurement not running for at least one second), all values will be None
Source§fn number_concentration_values(
&mut self,
) -> Result<NumberConcentrationValues, Error<E>>
fn number_concentration_values( &mut self, ) -> Result<NumberConcentrationValues, Error<E>>
Returns the measured number concentration values. The command Get Data Ready can be used to check if new data is available since the last read operation. If no new data is available, the previous values will be returned. If no data is available at all (e.g. measurement not running for at least one second), all values will be None
Source§fn set_temperature_offset_parameters(
&mut self,
tx: TemperatureOffsetParameters,
) -> Result<(), Error<E>>
fn set_temperature_offset_parameters( &mut self, tx: TemperatureOffsetParameters, ) -> Result<(), Error<E>>
This command allows to compensate temperature effects of the design-in at customer side by applying custom temperature offsets to the ambient temperature.
Source§fn set_temperature_acceleration_parameters(
&mut self,
tx: TemperatureAccelerationParameters,
) -> Result<(), Error<E>>
fn set_temperature_acceleration_parameters( &mut self, tx: TemperatureAccelerationParameters, ) -> Result<(), Error<E>>
This command allows to set custom temperature acceleration parameters of the RH/T engine. It overwrites the default temperature acceleration parameters of the RH/T engine with custom values.
Source§fn product_name(&mut self) -> Result<FixedStr<32>, Error<E>>
fn product_name(&mut self) -> Result<FixedStr<32>, Error<E>>
Gets the product name from the device
Source§fn serial_number(&mut self) -> Result<FixedStr<32>, Error<E>>
fn serial_number(&mut self) -> Result<FixedStr<32>, Error<E>>
Gets the serial number from the device.
Source§fn device_status(&mut self) -> Result<DeviceStatus, Error<E>>
fn device_status(&mut self) -> Result<DeviceStatus, Error<E>>
Reads the current device status.
Use this command to get detailed information about the device status. The device status is encoded in flags. Each device status flag represents a single bit in a 32-bit integer value. If more than one error is present, the device status register value is the sum of the corresponding flag values. For details about the available flags, refer to the Device Status Register documentation.
Note: The status flags of type “Error” are sticky, i.e. they are not cleared automatically even if the error condition no longer exists. So, they can only be cleared manually with read_and_clear_device_status or through a reset, either by calling Device Reset or through a power cycle. All other flags are not sticky, i.e. they are cleared automatically if the trigger condition disappears
Source§fn read_and_clear_device_status(&mut self) -> Result<DeviceStatus, Error<E>>
fn read_and_clear_device_status(&mut self) -> Result<DeviceStatus, Error<E>>
Reads the current device status (like command Read device_status) and afterwards clears all flags
Source§fn version(&mut self) -> Result<Version, Error<E>>
fn version(&mut self) -> Result<Version, Error<E>>
Gets the version information for the firmware
Source§fn device_reset(&mut self) -> Result<(), Error<E>>
fn device_reset(&mut self) -> Result<(), Error<E>>
Executes a reset on the device. This has the same effect as a power cycle
Source§fn start_fan_cleaning(&mut self) -> Result<(), Error<E>>
fn start_fan_cleaning(&mut self) -> Result<(), Error<E>>
This command triggers fan cleaning. The fan is set to the maximum speed for 10 seconds and then automatically stopped. Wait at least 10s after this command before starting a measurement.
Source§fn activate_sht_heater(&mut self) -> Result<(), Error<E>>
fn activate_sht_heater(&mut self) -> Result<(), Error<E>>
This command allows you to use the inbuilt heater in SHT sensor to reverse creep at high humidity. This command activates the SHT sensor heater with 200mW for 1s. The heater is then automatically deactivated again. For firmware versions with an Execution Time of 20ms in the table below, the Get SHT Heater Measurements command can be polled to check whether the heating is finished to trigger another cycle to maximize the duty cycle. Older firmware version do not yet support Get SHT Heater Measurements. Wait at least 20s after this command before starting a measurement to get coherent temperature values (heating consequence to disappear).
Source§fn sht_heater_measurements(&mut self) -> Result<ShtHeaterMeasurements, Error<E>>
fn sht_heater_measurements(&mut self) -> Result<ShtHeaterMeasurements, Error<E>>
Get the measurement values when the SHT sensor heating is finished. Note: This command is only available from the Firmware Version specified in the table below. It must be used after the Activate SHT Heater command. The command can be queried every 50ms to check if the heating cycle is finished and measurements are available.
Source§fn voc_algorithm_tuning_parameters(
&mut self,
) -> Result<VocAlgorithmTuningParameters, Error<E>>
fn voc_algorithm_tuning_parameters( &mut self, ) -> Result<VocAlgorithmTuningParameters, Error<E>>
Gets the parameters to customize the VOC algorithm. For more information on what the parameters below do, refer to Sensirion’s VOC Index for Indoor Air Applications.
Source§fn set_voc_algorithm_tuning_parameters(
&mut self,
tx: VocAlgorithmTuningParameters,
) -> Result<(), Error<E>>
fn set_voc_algorithm_tuning_parameters( &mut self, tx: VocAlgorithmTuningParameters, ) -> Result<(), Error<E>>
Sets the parameters to customize the VOC algorithm. It has no effect if at least one parameter is outside the specified range. For more information on what the parameters below do, refer to Sensirion’s VOC Index for Indoor Air Applications.
Source§fn voc_algorithm_state(&mut self) -> Result<VocAlgorithmState, Error<E>>
fn voc_algorithm_state(&mut self) -> Result<VocAlgorithmState, Error<E>>
Allows backup of the VOC algorithm state to resume operation after a power cycle or device reset, skipping initial learning phase. By default, the VOC Engine is reset, and the algorithm state is retained if a measurement is stopped and started again. If the VOC algorithm state shall be reset, a device reset, or a power cycle can be executed.
Source§fn set_voc_algorithm_state(
&mut self,
tx: VocAlgorithmState,
) -> Result<(), Error<E>>
fn set_voc_algorithm_state( &mut self, tx: VocAlgorithmState, ) -> Result<(), Error<E>>
Allows restoration of the VOC algorithm state to resume operation after a power cycle or device reset, skipping initial learning phase. By default, the VOC Engine is reset, and the algorithm state is retained if a measurement is stopped and started again. If the VOC algorithm state shall be reset, a device reset, or a power cycle can be executed. Sets the VOC algorithm state previously received with the Get VOC Algorithm State command. This command is only available in idle mode and the state will be applied only once when starting the next measurement. In measurement mode, this command has no effect.
Source§fn nox_algorithm_tuning_parameters(
&mut self,
) -> Result<NoxAlgorithmTuningParameters, Error<E>>
fn nox_algorithm_tuning_parameters( &mut self, ) -> Result<NoxAlgorithmTuningParameters, Error<E>>
Gets the parameters to customize the NOx algorithm. For more information on what the parameters below do, refer to Sensirion’s NOx Index for Indoor Air Applications.
Source§fn set_nox_algorithm_tuning_parameters(
&mut self,
tx: NoxAlgorithmTuningParameters,
) -> Result<(), Error<E>>
fn set_nox_algorithm_tuning_parameters( &mut self, tx: NoxAlgorithmTuningParameters, ) -> Result<(), Error<E>>
Sets the parameters to customize the NOx algorithm. It has no effect if at least one parameter is outside the specified range. To check whether the parameters have been set successfully, use the Get NOx Algorithm Tuning Parameters command. For more information on what the parameters below do, refer to Sensirion’s NOx Index for Indoor Air Applications.
Source§fn set_perform_forced_co2_recalibration(
&mut self,
tx: PpmU16,
) -> Result<Co2Correction, Error<E>>
fn set_perform_forced_co2_recalibration( &mut self, tx: PpmU16, ) -> Result<Co2Correction, Error<E>>
Execute the forced recalibration (FRC) of the CO2 signal. To successfully conduct an accurate FRC, the following steps need to be taken:
- Start a measurement with the command Start Continuous Measurement and operate the sensor for at least 3 minutes in an environment with homogenous and constant CO2 concentration. If applicable, the reference value for altitude or pressure compensation must be provided to the sensor beforehand with the command Set Sensor Altitude or Set Ambient Pressure respectively.
- Stop the measurement with the command Stop Measurement and wait at least 1400ms.
- Issue the Perform Forced CO2 Recalibration command with the reference CO2 concentration that the sensor should be set to. The recalibration procedure will take about 500 ms to complete, during which time no other functions can be executed. A return value of 0xFFFF indicates that the FRC has failed
Source§fn perform_co2_sensor_factory_reset(&mut self) -> Result<(), Error<E>>
fn perform_co2_sensor_factory_reset(&mut self) -> Result<(), Error<E>>
This command resets all CO2 sensor configuration settings stored in the EEPROM and erases the forced recalibration (FRC) and automatic self-calibration (ASC) algorithm history of the CO2 sensor, restarting the bypass phase. Refer to the STCC4 datasheet for more information.
Source§fn co2_sensor_automatic_self_calibration(&mut self) -> Result<bool, Error<E>>
fn co2_sensor_automatic_self_calibration(&mut self) -> Result<bool, Error<E>>
Gets the status of the CO2 sensor automatic self-calibration (ASC). The CO2 sensor supports automatic self-calibration (ASC) for long-term stability of the CO2 output. This feature can be enabled or disabled. By default, it is enabled.
Source§fn set_co2_sensor_automatic_self_calibration(
&mut self,
tx: bool,
) -> Result<(), Error<E>>
fn set_co2_sensor_automatic_self_calibration( &mut self, tx: bool, ) -> Result<(), Error<E>>
Sets the status of the CO2 sensor automatic self-calibration (ASC). The CO2 sensor supports automatic self-calibration (ASC) for long-term stability of the CO2 output. This feature can be enabled or disabled. By default, it is enabled. The automatic self-calibration can be disabled for testing under lab conditions where concentrations below 400ppm are expected, to avoid an alteration of the baseline. In the field, ASC must be enabled and exposure to fresh air (i.e. CO2 concentration at 400 ppm) at least once per week is required to reach datasheet specifications
Source§fn ambient_pressure(&mut self) -> Result<Hpa, Error<E>>
fn ambient_pressure(&mut self) -> Result<Hpa, Error<E>>
Gets the ambient pressure value that was set with Set Ambient Pressure. The ambient pressure can be used for pressure compensation in the CO2 sensor
Source§fn set_ambient_pressure(&mut self, tx: Hpa) -> Result<(), Error<E>>
fn set_ambient_pressure(&mut self, tx: Hpa) -> Result<(), Error<E>>
Sets the ambient pressure value. The ambient pressure can be used for pressure compensation in the CO2 sensor. Setting an ambient pressure overrides any pressure compensation based on a previously set sensor altitude. Use of this command is recommended for applications experiencing significant ambient pressure changes to ensure CO2 sensor accuracy. Valid input values are between 700 to 1’200 hPa. The default value is 1013 hPa.
Source§fn sensor_altitude(&mut self) -> Result<Meters, Error<E>>
fn sensor_altitude(&mut self) -> Result<Meters, Error<E>>
Gets the current sensor altitude. The sensor altitude can be used for pressure compensation in the CO2 sensor.
Source§fn set_sensor_altitude(&mut self, tx: Meters) -> Result<(), Error<E>>
fn set_sensor_altitude(&mut self, tx: Meters) -> Result<(), Error<E>>
Sets the current sensor altitude. The sensor altitude can be used for pressure compensation in the CO2 sensor. The default sensor altitude value is set to 0 meters above sea level. Valid input values are between 0 and 3000m.
Source§impl<T, E> Sen69cCommandsAsync<E> for Twhere
T: Sen6xConnection<Sen69c, E>,
impl<T, E> Sen69cCommandsAsync<E> for Twhere
T: Sen6xConnection<Sen69c, E>,
Source§async fn start_continuous_measurement(&mut self) -> Result<(), Error<E>>
async fn start_continuous_measurement(&mut self) -> Result<(), Error<E>>
Starts a continuous measurement. After starting the measurement, it takes some time (~1.1s) until the first measurement results are available. You could poll with the command Get Data Ready to check when the results are ready to be read.
Note: For SEN63C and SEN69C only: SEN63C and SEN69C are conditioning the CO2 sensor during the initial 24 seconds after starting a measurement. As this process cannot be interrupted, the following limitations apply during this period:
- You may stop the measurement if needed, but do not start it again until at least 24 seconds have passed to avoid a CO2-1 – CO2 Sensor Error.
- Do not stop the sensor and use the commands Perform Forced CO2 Recalibration, Set CO2 Sensor Automatic Self Calibration or Perform CO2 Sensor Factory Reset.
Source§async fn stop_measurement(&mut self) -> Result<(), Error<E>>
async fn stop_measurement(&mut self) -> Result<(), Error<E>>
Stops the measurement and returns to idle mode.
Source§async fn data_ready(&mut self) -> Result<DataReady, Error<E>>
async fn data_ready(&mut self) -> Result<DataReady, Error<E>>
This command can be used to check if new measurement results are ready to read. The data_ready flag is automatically reset after reading the measurement values.
Source§async fn measured_values(&mut self) -> Result<MeasuredValuesSen69c, Error<E>>
async fn measured_values(&mut self) -> Result<MeasuredValuesSen69c, Error<E>>
Returns the measured values. The command data_ready can be used to check if new data is available since the last read operation. If no new data is available, the previous values will be returned. If no data is available at all (e.g. measurement not running for at least one second), all values will be None
Source§async fn raw_values(&mut self) -> Result<RawValuesSen65Sen68Sen69c, Error<E>>
async fn raw_values(&mut self) -> Result<RawValuesSen65Sen68Sen69c, Error<E>>
Returns the measured raw values. The command data_ready can be used to check if new data is available since the last read operation. If no new data is available, the previous values will be returned. If no data is available at all (e.g. measurement not running for at least one second), all values will be None
Source§async fn number_concentration_values(
&mut self,
) -> Result<NumberConcentrationValues, Error<E>>
async fn number_concentration_values( &mut self, ) -> Result<NumberConcentrationValues, Error<E>>
Returns the measured number concentration values. The command Get Data Ready can be used to check if new data is available since the last read operation. If no new data is available, the previous values will be returned. If no data is available at all (e.g. measurement not running for at least one second), all values will be None
Source§async fn set_temperature_offset_parameters(
&mut self,
tx: TemperatureOffsetParameters,
) -> Result<(), Error<E>>
async fn set_temperature_offset_parameters( &mut self, tx: TemperatureOffsetParameters, ) -> Result<(), Error<E>>
This command allows to compensate temperature effects of the design-in at customer side by applying custom temperature offsets to the ambient temperature.
Source§async fn set_temperature_acceleration_parameters(
&mut self,
tx: TemperatureAccelerationParameters,
) -> Result<(), Error<E>>
async fn set_temperature_acceleration_parameters( &mut self, tx: TemperatureAccelerationParameters, ) -> Result<(), Error<E>>
This command allows to set custom temperature acceleration parameters of the RH/T engine. It overwrites the default temperature acceleration parameters of the RH/T engine with custom values.
Source§async fn product_name(&mut self) -> Result<FixedStr<32>, Error<E>>
async fn product_name(&mut self) -> Result<FixedStr<32>, Error<E>>
Gets the product name from the device
Source§async fn serial_number(&mut self) -> Result<FixedStr<32>, Error<E>>
async fn serial_number(&mut self) -> Result<FixedStr<32>, Error<E>>
Gets the serial number from the device.
Source§async fn device_status(&mut self) -> Result<DeviceStatus, Error<E>>
async fn device_status(&mut self) -> Result<DeviceStatus, Error<E>>
Reads the current device status.
Use this command to get detailed information about the device status. The device status is encoded in flags. Each device status flag represents a single bit in a 32-bit integer value. If more than one error is present, the device status register value is the sum of the corresponding flag values. For details about the available flags, refer to the Device Status Register documentation.
Note: The status flags of type “Error” are sticky, i.e. they are not cleared automatically even if the error condition no longer exists. So, they can only be cleared manually with read_and_clear_device_status or through a reset, either by calling Device Reset or through a power cycle. All other flags are not sticky, i.e. they are cleared automatically if the trigger condition disappears
Source§async fn read_and_clear_device_status(
&mut self,
) -> Result<DeviceStatus, Error<E>>
async fn read_and_clear_device_status( &mut self, ) -> Result<DeviceStatus, Error<E>>
Reads the current device status (like command Read device_status) and afterwards clears all flags
Source§async fn version(&mut self) -> Result<Version, Error<E>>
async fn version(&mut self) -> Result<Version, Error<E>>
Gets the version information for the firmware
Source§async fn device_reset(&mut self) -> Result<(), Error<E>>
async fn device_reset(&mut self) -> Result<(), Error<E>>
Executes a reset on the device. This has the same effect as a power cycle
Source§async fn start_fan_cleaning(&mut self) -> Result<(), Error<E>>
async fn start_fan_cleaning(&mut self) -> Result<(), Error<E>>
This command triggers fan cleaning. The fan is set to the maximum speed for 10 seconds and then automatically stopped. Wait at least 10s after this command before starting a measurement.
Source§async fn activate_sht_heater(&mut self) -> Result<(), Error<E>>
async fn activate_sht_heater(&mut self) -> Result<(), Error<E>>
This command allows you to use the inbuilt heater in SHT sensor to reverse creep at high humidity. This command activates the SHT sensor heater with 200mW for 1s. The heater is then automatically deactivated again. For firmware versions with an Execution Time of 20ms in the table below, the Get SHT Heater Measurements command can be polled to check whether the heating is finished to trigger another cycle to maximize the duty cycle. Older firmware version do not yet support Get SHT Heater Measurements. Wait at least 20s after this command before starting a measurement to get coherent temperature values (heating consequence to disappear).
Source§async fn sht_heater_measurements(
&mut self,
) -> Result<ShtHeaterMeasurements, Error<E>>
async fn sht_heater_measurements( &mut self, ) -> Result<ShtHeaterMeasurements, Error<E>>
Get the measurement values when the SHT sensor heating is finished. Note: This command is only available from the Firmware Version specified in the table below. It must be used after the Activate SHT Heater command. The command can be queried every 50ms to check if the heating cycle is finished and measurements are available.
Source§async fn voc_algorithm_tuning_parameters(
&mut self,
) -> Result<VocAlgorithmTuningParameters, Error<E>>
async fn voc_algorithm_tuning_parameters( &mut self, ) -> Result<VocAlgorithmTuningParameters, Error<E>>
Gets the parameters to customize the VOC algorithm. For more information on what the parameters below do, refer to Sensirion’s VOC Index for Indoor Air Applications.
Source§async fn set_voc_algorithm_tuning_parameters(
&mut self,
tx: VocAlgorithmTuningParameters,
) -> Result<(), Error<E>>
async fn set_voc_algorithm_tuning_parameters( &mut self, tx: VocAlgorithmTuningParameters, ) -> Result<(), Error<E>>
Sets the parameters to customize the VOC algorithm. It has no effect if at least one parameter is outside the specified range. For more information on what the parameters below do, refer to Sensirion’s VOC Index for Indoor Air Applications.
Source§async fn voc_algorithm_state(&mut self) -> Result<VocAlgorithmState, Error<E>>
async fn voc_algorithm_state(&mut self) -> Result<VocAlgorithmState, Error<E>>
Allows backup of the VOC algorithm state to resume operation after a power cycle or device reset, skipping initial learning phase. By default, the VOC Engine is reset, and the algorithm state is retained if a measurement is stopped and started again. If the VOC algorithm state shall be reset, a device reset, or a power cycle can be executed.
Source§async fn set_voc_algorithm_state(
&mut self,
tx: VocAlgorithmState,
) -> Result<(), Error<E>>
async fn set_voc_algorithm_state( &mut self, tx: VocAlgorithmState, ) -> Result<(), Error<E>>
Allows restoration of the VOC algorithm state to resume operation after a power cycle or device reset, skipping initial learning phase. By default, the VOC Engine is reset, and the algorithm state is retained if a measurement is stopped and started again. If the VOC algorithm state shall be reset, a device reset, or a power cycle can be executed. Sets the VOC algorithm state previously received with the Get VOC Algorithm State command. This command is only available in idle mode and the state will be applied only once when starting the next measurement. In measurement mode, this command has no effect.
Source§async fn nox_algorithm_tuning_parameters(
&mut self,
) -> Result<NoxAlgorithmTuningParameters, Error<E>>
async fn nox_algorithm_tuning_parameters( &mut self, ) -> Result<NoxAlgorithmTuningParameters, Error<E>>
Gets the parameters to customize the NOx algorithm. For more information on what the parameters below do, refer to Sensirion’s NOx Index for Indoor Air Applications.
Source§async fn set_nox_algorithm_tuning_parameters(
&mut self,
tx: NoxAlgorithmTuningParameters,
) -> Result<(), Error<E>>
async fn set_nox_algorithm_tuning_parameters( &mut self, tx: NoxAlgorithmTuningParameters, ) -> Result<(), Error<E>>
Sets the parameters to customize the NOx algorithm. It has no effect if at least one parameter is outside the specified range. To check whether the parameters have been set successfully, use the Get NOx Algorithm Tuning Parameters command. For more information on what the parameters below do, refer to Sensirion’s NOx Index for Indoor Air Applications.
Source§async fn set_perform_forced_co2_recalibration(
&mut self,
tx: PpmU16,
) -> Result<Co2Correction, Error<E>>
async fn set_perform_forced_co2_recalibration( &mut self, tx: PpmU16, ) -> Result<Co2Correction, Error<E>>
Execute the forced recalibration (FRC) of the CO2 signal. To successfully conduct an accurate FRC, the following steps need to be taken:
- Start a measurement with the command Start Continuous Measurement and operate the sensor for at least 3 minutes in an environment with homogenous and constant CO2 concentration. If applicable, the reference value for altitude or pressure compensation must be provided to the sensor beforehand with the command Set Sensor Altitude or Set Ambient Pressure respectively.
- Stop the measurement with the command Stop Measurement and wait at least 1400ms.
- Issue the Perform Forced CO2 Recalibration command with the reference CO2 concentration that the sensor should be set to. The recalibration procedure will take about 500 ms to complete, during which time no other functions can be executed. A return value of 0xFFFF indicates that the FRC has failed
Source§async fn perform_co2_sensor_factory_reset(&mut self) -> Result<(), Error<E>>
async fn perform_co2_sensor_factory_reset(&mut self) -> Result<(), Error<E>>
This command resets all CO2 sensor configuration settings stored in the EEPROM and erases the forced recalibration (FRC) and automatic self-calibration (ASC) algorithm history of the CO2 sensor, restarting the bypass phase. Refer to the STCC4 datasheet for more information.
Source§async fn co2_sensor_automatic_self_calibration(
&mut self,
) -> Result<bool, Error<E>>
async fn co2_sensor_automatic_self_calibration( &mut self, ) -> Result<bool, Error<E>>
Gets the status of the CO2 sensor automatic self-calibration (ASC). The CO2 sensor supports automatic self-calibration (ASC) for long-term stability of the CO2 output. This feature can be enabled or disabled. By default, it is enabled.
Source§async fn set_co2_sensor_automatic_self_calibration(
&mut self,
tx: bool,
) -> Result<(), Error<E>>
async fn set_co2_sensor_automatic_self_calibration( &mut self, tx: bool, ) -> Result<(), Error<E>>
Sets the status of the CO2 sensor automatic self-calibration (ASC). The CO2 sensor supports automatic self-calibration (ASC) for long-term stability of the CO2 output. This feature can be enabled or disabled. By default, it is enabled. The automatic self-calibration can be disabled for testing under lab conditions where concentrations below 400ppm are expected, to avoid an alteration of the baseline. In the field, ASC must be enabled and exposure to fresh air (i.e. CO2 concentration at 400 ppm) at least once per week is required to reach datasheet specifications
Source§async fn ambient_pressure(&mut self) -> Result<Hpa, Error<E>>
async fn ambient_pressure(&mut self) -> Result<Hpa, Error<E>>
Gets the ambient pressure value that was set with Set Ambient Pressure. The ambient pressure can be used for pressure compensation in the CO2 sensor
Source§async fn set_ambient_pressure(&mut self, tx: Hpa) -> Result<(), Error<E>>
async fn set_ambient_pressure(&mut self, tx: Hpa) -> Result<(), Error<E>>
Sets the ambient pressure value. The ambient pressure can be used for pressure compensation in the CO2 sensor. Setting an ambient pressure overrides any pressure compensation based on a previously set sensor altitude. Use of this command is recommended for applications experiencing significant ambient pressure changes to ensure CO2 sensor accuracy. Valid input values are between 700 to 1’200 hPa. The default value is 1013 hPa.
Source§async fn sensor_altitude(&mut self) -> Result<Meters, Error<E>>
async fn sensor_altitude(&mut self) -> Result<Meters, Error<E>>
Gets the current sensor altitude. The sensor altitude can be used for pressure compensation in the CO2 sensor.
Source§async fn set_sensor_altitude(&mut self, tx: Meters) -> Result<(), Error<E>>
async fn set_sensor_altitude(&mut self, tx: Meters) -> Result<(), Error<E>>
Sets the current sensor altitude. The sensor altitude can be used for pressure compensation in the CO2 sensor. The default sensor altitude value is set to 0 meters above sea level. Valid input values are between 0 and 3000m.