Crate mics_vz_89te

Crate mics_vz_89te 

Source
Expand description

§Driver for MICS-VZ-89TE sensor

This driver can be used to read CO2 and voc measurements of the MICS-VZ-89TE sensor. CO2 is measured in ppm in range from 400 to 2000. VOC is measured in ppb in range from 0 to 1000. At startup the sensor needs around 15 minutes to deliver a valid CO2 value, as noted in the datasheet.

To use this driver, the I2C bus has to be set to a max baudrate of 100_000.

§Feature flags

  • std: Enables error handling with std::error::Error.
  • time: Enables compatibility with time::Date on struct RevisionDate.
  • unproven: Enables ppm calibration and r0 value retrieving. (Correct functionality couldn’t be verified.)

§Example Usage

let mut delay = ...; // delay struct from board
let i2c = ...; // I2C bus to use

let mut device = MicsVz89Te::new(i2c);
let measurements = device.read_measurements(&mut delay).unwrap();

let co2 = measurements.co2;
let voc = measurements.voc;

let i2c = device.release(); // destruct driver to use bus with other drivers

Modules§

error

Structs§

Measurements
Returned measurements by the sensor
MicsVz89Te
Driver for MICS-VZ-89TE sensor
RevisionDate
Represents the date of revision of the sensor.