DHT11 Temperature and Humidity Meter
Beginner20 minA starter project that measures the room's temperature and humidity with a DHT11 sensor and writes the values to the Arduino IDE's Serial Monitor once a second. Before uploading the code, install the DHTlib library in the Arduino IDE.
Build it step by step in the appWhat you need
1 × Arduino Uno R3
1 × DHT11 Temperature/Humidity Sensor
3 × Jumper Wire - Male/Female
Wiring steps
- 1
Power the sensor

Plug a red jumper wire into the 5V pin on the Arduino's POWER header. Connect its other end to the top pin of the DHT11 module, marked + (VCC).
- 2
Connect the data line

Plug a blue jumper wire into the Arduino's digital pin 2. Connect its other end to the middle data (DATA) pin of the DHT11 module. The code reads the sensor on this pin.
- 3
Ground (GND) connection

Plug a black jumper wire into the GND pin on the Arduino's digital header, next to pin 13. Connect its other end to the bottom pin of the DHT11 module, marked −. That completes all three of the sensor's connections.
Arduino sketch
#include <dht.h>
dht DHT;
void setup() {
Serial.begin(9600);
}
void loop() {
// DHT11 sensörünü 2 numaralı pinden okuyoruz
int chk = DHT.read11(2);
// Sıcaklık verisini Serial Monitor'e yazdır
Serial.print("Temp: ");
Serial.print(DHT.temperature);
Serial.print(" °C\t"); // '\t' ile araya bir tab boşluğu ekliyoruz
// Nem verisini Serial Monitor'e yazdır
Serial.print("Humidity: ");
Serial.print(DHT.humidity);
Serial.println(" %"); // Satırı bitirip bir alt satıra geçmek için println kullanıyoruz
delay(1000);
}
What the Serial Monitor shows
Temp: 24.00 °C Humidity: 45.00 % Temp: 24.00 °C Humidity: 45.00 %
In the app, tick off every wire, match the parts to your inventory and pick up where you left off.
Build it step by step in the app