Page 1 of 1

DHT22 library for ESP32

Posted: Tue Jun 20, 2017 12:46 am
by gosouth
Hello,

please feel free to use and share the HDT22 driver / library for ESP32

https://github.com/gosouth/DHT22

The code works fine, however it needs some work in a function called 'getSignalLevel( )'. I'm looking for a good method to measure a pulse width. Something with interrupt blocking... If someone has a good idea, please let me know.

chao

Re: DHT22 library for ESP32

Posted: Tue Jun 20, 2017 5:49 am
by ESP_Sprite
Use the RMT peripheral; it's perfect for signals like this and should be able to receive the DHT22 signal all on its own. It can trigger an interrupt afterwards, and you can use that to un-block a task that decodes the temp/humidity from it and passes it on.