DHTxx Temperature and Humidity Sensor
Overview
A sensor capable of measuring temperature and humidity.


Compatible Modules
- DHT11
- DHT22
Specifications (DHT11)
- Supply Voltage: 3.5 to 5.5V
- Output Signal: digital signal via single-bus
- Operating Range and Accuracy (Humidity): 20-80% RH; +/-5% RH
- Operating Range and Accuracy (Temperature): 0 to 50 C; +/-2% C
Supported GPIO
- Raspberry Pi 0~4
Commands
[INIT]
Enters initial configuration settings.
Item | Type | Description |
---|---|---|
Data Pin | WRITE | Enter the GPIO pin number to connect to the Data pin. |
[READ_DATA]
Reads temperature and humidity values.
Item | Type | Description |
---|---|---|
Temperature (℃) | READ | Measured temperature in Celsius. |
Temperature (°F) | READ | Measured temperature in Fahrenheit. |
Humidity (%) | READ | Measured relative humidity. |
Example
Objective
Read temperature and humidity from the DHT11 sensor and display them on dashboard gauge widgets.
Parts
Part | Quantity |
---|---|
Raspberry Pi 4 * | 1 |
DHT11 | 1 |
* Other hardware can also be used. Refer to Supported GPIO.
Wiring
DHT11 | GPIO |
---|---|
VCC | 3.3V * |
Data | 23 ** |
GND | GND |
* Must be connected to 3.3V. Connecting to 5V may damage the Raspberry Pi.
** Any GPIO pins can be used.

Project Link