DHT
It's a crate that handle the reading of data of a DHT11/22 (temperature/humidity sensor) using esp_idf_hal on a esp32
How to use
[]
= "^0.1"
Here's a sample code:
use ;
use Peripherals;
use *;
use sleep;
use Duration;
use esp_idf_dht;
How to debug?
-
Run this via terminal to build+flash
cargo build && espflash flash --monitor target/xtensa-esp32s3-espidf/debug/first-esp -
Use
Attach to ESP32-S3run the debugger the moment the flash finish
How to run unit test
- Run unit tests with
rustc --test src/utils.rs -o utils_test && ./utils_test