ArduinoLab
PNLProjectsAbout
ArduinoLab

Empowering the next generation of makers and engineers through open-source robotics education.

Platform

  • Explore Projects
  • About Us
  • Login

Organization

  • Pensée Nationale Libre Mahdia
  • Projet SWAFY

Support

  • heythem.94@gmail.com
  • +216 50 126 064

© 2026 ArduinoLab. All rights reserved.

Powered by AI & PNL Volunteers

Developed with ❤️ by Haythem Baganna

Weather Station with Arduino Uno, DHT11, and I2C LCD
Sensors

Weather Station with Arduino Uno, DHT11, and I2C LCD

This project demonstrates how to build a simple weather station using an Arduino Uno, a DHT11 temperature and humidity sensor, and an I2C LCD display.

Haythem
PNL Mahdia

Step-by-Step Guide

1

Materials List

- 1 Arduino Uno - 1 DHT11 temperature and humidity sensor - 1 I2C LCD display (2x16 or 4x20) - 1 Breadboard - Jumper wires - 1 Resistor (optional)
Click to expand
Step 1
2

Assembling

1. Connect the DHT11 sensor to the Arduino Uno: VCC to 5V, GND to GND, and DOUT to any digital pin (e.g., pin 2). 2. Connect the I2C LCD display to the Arduino Uno: VCC to 5V, GND to GND, SCL to SCL, and SDA to SDA. 3. Connect the jumper wires to the Breadboard and connect the components. 4. If using a resistor, connect it between the DHT11 sensor's VCC and the Arduino Uno's 5V pin.
3

Arduino Code & Libraries

The project requires the 'DHT' library for the DHT11 sensor and the 'LiquidCrystal_I2C' library for the I2C LCD display.

arduino code:

#define DHTPIN 2

#define DHTTYPE DHT11

#define LCD_ADDRESS 0x27 DHT dht(DHTPIN, DHTTYPE);

LiquidCrystal_I2C lcd(LCD_ADDRESS, 16, 2);

void setup() {

Serial.begin(9600);

lcd.init();

lcd.backlight();

dht.begin();

}

void loop() {

float temperature = dht.readTemperature();

float humidity = dht.readHumidity();

lcd.setCursor(0, 0);

lcd.print("Temp: ");

lcd.print(temperature);

lcd.print("C");

lcd.setCursor(0, 1);

lcd.print("Humidity: ");

lcd.print(humidity);

lcd.print("%");

delay(1000);

}

Project Resources

No downloadable resources added yet.

Please login to leave a comment.

0 Comments

No comments yet. Be the first to share your thoughts!