DHT11
DHT11 module pinout, how it differs from the DHT22, the once-per-second read limit, wiring on 3.3 V and 5 V boards and common read errors.
Community draft — report a mistake
3.3 V or 5 V? Power it from your board's logic voltage so the data line matches the GPIO: 3.3 V on ESP32 and Pico, 5 V on Uno.
The DHT11 is the blue, budget cousin of the DHT22: 0–50 °C at ±2 °C and 20–90 % RH at ±5 %, in whole-number steps, with at most one reading per second. It’s fine for learning and room displays, not for weather stations.
It uses the same single-wire protocol and the same Adafruit library as the DHT22 — only the type in DHT dht(PIN, DHT11) changes.
Modules vs bare sensor. The common 3-pin blue module already has the pull-up resistor and often a power LED. The bare 4-pin sensor (VCC, DATA, NC, GND) needs an external 4.7–10 kΩ pull-up on DATA.
Prices are indicative (Oct 2026) and vary by seller.
Pinout
| Pin | What it does |
|---|---|
VCC | 3.3–5.5 V supply |
DATA | Single-wire data. Blue 3-pin modules include the pull-up; the bare 4-pin sensor needs 4.7–10 kΩ to VCC. |
GND | Ground |
Library
DHT sensor library by Adafruit (also install Adafruit Unified Sensor)
Arduino IDE → Library Manager → search the name above. Each guide lists the exact version we compile against.
Use it with
Common errors
“Failed to read from DHT sensor!”
Wrong pin in the sketch, missing pull-up on a bare sensor, or reading more than once a second. Use DHT11 (not DHT22) as the type.
Humidity stuck at a round number
The DHT11 only resolves 1 % RH and 1 °C. If you need decimals, use a DHT22 or SHT31.
Different modules have different pin orders
Read the labels (S, +, −) printed on your module — they vary between sellers.