Function zg_co2::decode[][src]

pub fn decode(data: [u8; 5]) -> Result<SingleReading>

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.