Skip to main content

wokwi-dht22 Reference

Digital Humidity and Temperature sensor.

Pin names

VCCPositive voltage
SDADigital data pin (input/output)
NCNot connected


NameDescriptionDefault value
temperatureInitial temperature value (celsius)"24"
humidityInitial relative humidity value (percentage)"40"

Controlling the temperature

You can change the temperature and humidity values while the simulation is running. Click on the DHT22 sensor and a small popup window will open. Use the temperature and humidity sliders to change the values. Click "Hide" to close the popup window.


If you are trying to read this sensor from the ESP32, use the "DHT sensor library for ESPx" library. Other DHT22 libraries may not work reliably on the ESP32. You can use this example project as a starting point.

Simulator examples