DHT22 library for ESP32

User avatar
Posts: 1
Joined: Sun May 28, 2017 1:37 pm

DHT22 library for ESP32

Postby gosouth » Tue Jun 20, 2017 12:46 am


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


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.


Posts: 3477
Joined: Thu Nov 26, 2015 4:08 am

Re: DHT22 library for ESP32

Postby ESP_Sprite » Tue Jun 20, 2017 5:49 am

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.

Who is online

Users browsing this forum: No registered users and 7 guests