Main hardware architecture running live ambient temperature and humidity sensing.
Arduino-based environmental monitoring solution designed to track indoor climate metrics in real time. By interfacing a DHT11 sensor with a 16x2 LCD display, the system processes live temperature and humidity telemetry directly on the microcontroller, providing clear and instantaneous visual output.
- Real-Time Telemetry: Instant continuous updates for ambient temperature (°C) and relative humidity (%).
- Modular Hardware Architecture: Circuit design and pin mapping structured for quick testing, hardware isolation, and easy component swapping.
- Efficient Polling Cycle: Optimized code logic to prevent sensor heating and ensure accurate readings without blocking execution loops.
- Microcontroller: Arduino (Uno, Nano or compatible)
- Sensor: DHT11 Temperature & Humidity Sensor
- Display: 16x2 LCD Module
- Control: Push Button (for mode toggle/Reset) & Potentiometer (LCD brightness)
-
Clone this repository:
git clone [https://github.com/znx0/lcd-dht11.git](https://github.com/znx0/lcd-dht11.git) cd lcd-dht11 -
Open the main sketch lcd-dht11.ino (the .ino file in the root folder) in the Arduino IDE
-
Install required libraries via Tools -> Manage Libraries:
- DHT sensor by
- LiquiddCrystal
-
Select you board (e.g., Arduino Uno/Nano) and serial port under Tools,
-
Click Upload to flash the firmware to your microcontroller
Before assembling the full system, it is recommended to test each component individually using the standalone test scripts located in the tests/ directory.
This ensures all modules, pins, and wiring are functioning correctly.
Reads ambient data and outputs temperature (°C) and humidity (%) directly to the Serial Monitor.
- Test Script:
tests/dht11_test.ino
Verifies digital input reading and pull-up/pull-down resistor logic.
- Test Script:
tests/button_test.ino
Initializes the display, renders 'Hello World' to test characters to ensure proper wiring and contrast. If needed, you can rotate the potentiometer to adjust the brightness of the screen.
- Test Script:
tests/lcd_test.ino
| LCD | Arduino | LCD | Arduino |
|---|---|---|---|
| RS | Digital 12 | RW | GND |
| Enable (E) | Digital 11 | VSS | GND |
| D4 | Digital 5 | VCC | 5V |
| D5 | Digital 4 | LED+ (A) | 5V (220Ω) |
| D6 | Digital 3 | LED- (K) | GND |
| D7 | Digital 2 | Vo | Potentiometer Output |
Once all standalone tests pass, assemble the full circuit on your main breadboard following the layout below.
- Validate Components: Ensure all modules passed the individual tests in
tests/. - Breadboard Wiring: Connect the Arduino, DHT11, 16x2 LCD, potentiometer, and push button according to your pin mapping.
- Configure Pinout: Open the main firmware (
lcd-dht11.ino) and adjust the pin definitions if your hardware layout differs:
// Default Pin Configuration
#define DHTPIN 2
#define BUTTON_PIN 3
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);Watch the system reading real-time climate data and updating the LCD output:
IMG_7684.mp4
- Real-time Telemetry: The LCD continuously displays live temperature (°C) and humidity (%) from the DHT11 sensor.
- Mode Switch: Pressing the button toggles the display mode and reseting the LCD.





