dht22-sensor 0.1.0

A no_std driver for the DHT22 (AM2302) temperature and humidity sensor
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/// Possible errors from the DHT22 driver.
#[derive(Debug, PartialEq, Eq)]
pub enum DhtError<E> {
    /// Timed out waiting for a pin state change.
    Timeout,
    /// Checksum did not match the received data.
    ChecksumMismatch,
    /// Error from the GPIO pin (input/output).
    PinError(E),
}

impl<E> From<E> for DhtError<E> {
    fn from(value: E) -> Self {
        Self::PinError(value)
    }
}