zg_co2Function decode
Source pub fn decode(data: [u8; 5]) -> Result<SingleReading>
Expand description
Decodes a message from the sensor.
§Example
let decoded = zg_co2::decode([0x50, 0x04, 0x57, 0xab, 0x0d]);
§Errors
An error will be returned if the message could not be decoded.