| Crates.io | esp32-dht11-rs |
| lib.rs | esp32-dht11-rs |
| version | 0.1.3-1.0.0-beta.1 |
| created_at | 2025-07-03 20:23:33.37914+00 |
| updated_at | 2025-07-05 04:31:34.908111+00 |
| description | A Rust crate that reads temperature and humidity data from the DHT11 sensors for esp32 series. |
| homepage | https://github.com/wendell1002/esp32-dht11-rs |
| repository | https://github.com/wendell1002/esp32-dht11-rs |
| max_upload_size | |
| id | 1736920 |
| size | 42,227 |
esp32-dht11-rs is is a Rust crate that reads temperature and humidity data from the DHT11 sensors for esp32 series.
This library is #![no_std] and depends on embedded_hal and esp-hal.
let delay = Delay::new();
let mut dht11 = DHT11::new(peripherals.GPIO2, delay);
loop {
match dht11.read() {
Ok(m) => log::info!(
"DHT 11 Sensor - Temperature: {} °C, humidity: {} %",
m.temperature,
m.humidity
),
Err(error) => log::error!("An error occurred while trying to read sensor: {:?}", error),
}
delay.delay_millis(1000);
}