Expand description
A no_std crate implementing the ZyAura ZG CO₂ sensor protocol.
This crate decodes the packets, but does not perform the decryption
commonly required for USB devices using this sensor. To read data from one
of the compatible commercially-available USB sensors, use the
co2mon crate.
The implementation was tested using a TFA-Dostmann AIRCO2NTROL MINI sensor.
§Example
let packet = [0x50, 0x04, 0x57, 0xab, 0x0d];
let reading = zg_co2::decode(packet)?;
println!("{:?}", reading);§Features
The std feature, enabled by default, makes Error implement the
Error trait.
§References
See this link for more information about the protocol.
Enums§
- Error
- A possible error value when decoding a sensor message.
- Single
Reading - A single sensor reading.
Functions§
- decode
- Decodes a message from the sensor.