
In recent years, the need for efficient and real-time heat monitoring systems has become increasingly critical, particularly in areas related to environmental conditions. One such application is monitoring the heat index, which combines air temperature and relative humidity to estimate how hot it feels. Accurate and timely measurement of the heat index is essential for various sectors, including agriculture, health care, and meteorology, to ensure safety and optimal performance.
This project presents an “Arduino Real-Time Heat Index System” using the DHT11 sensor and an I2C LCD display. The DHT11 sensor is a low-cost digital sensor that measures temperature and humidity, making it ideal for calculating the heat index. By integrating this sensor with an Arduino microcontroller and an I2C LCD display, we can create a simple yet effective system to continuously monitor and display the heat index in real-time.
The Arduino platform is chosen for its versatility and ease of use, making it accessible even for beginners. The I2C LCD display is used to provide a clear and concise output of the heat index, ensuring that the information is readily available and easy to interpret. This project not only demonstrates the practical application of these components but also serves as an educational tool for those learners interested in learning more about Arduino-based embedded systems and environmental monitoring system.
Circuit Diagram

Components Required
- Arduino Board (Arduino Nano or Uno)
- DHT11 Temperature and Humidity Sensor 12C LCD Display
- Breadboard
- Jumper Wires
- USB Cable for Arduino
Understanding the Components
DHT11 Sensor: This is a basic, low-cost digital sensor used for measuring temperature and humidity. It provides a calibrated digital output and is simple to interface with any microcontroller.
12C LCD Display: An LCD screen with an I2C interface is used to display the heat index. The I2C interface simplifies the wiring, reducing the number of pins required to connect the LCD to the Arduino.
Arduino Nano: This open-source platform consists of both hardware and software. It’s perfect for beginners due to its simplicity and large community support.
Connection of the Components
Wiring the DHT11 Sensor:
- Connect the VCC pin of the DHT11 to the 5V pin on the Arduino.
Connect the GND pin to the GND on the Arduino. - Connect the DATA pin to digital pin 2 on the Arduino.
Wiring the 12C LCD Display:
- Connect the VCC and GND pins of the I2C module to the 5V and GND pins on the Arduino, respectively.
- Connect the SDA (data) pin to the A4 pin on the Arduino.
- Connect the SCL (clock) pin to the A5 pin on the Arduino.
Schematics Diagram

Prepare & Upload Code
- Open the Arduino IDE.
- Go to Sketch > Include Library > Add .ZIP Library. • Install both the DHT and Adafruit sensor library.
- Install the LiquidCrystal 12C library.
- Connect your Arduino to your computer using a USB cable.
- Select the correct board and port in the Arduino IDE under Tools.
- Click the upload button to transfer the code to your Arduino.
Arduino Code
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#include <DHT.h>
#define DHTPIN 2 // Pin which is connected to the DHT sensor
#define DHTTYPE DHT11 // DHT 11
DHT dht(DHTPIN, DHTTYPE);
LiquidCrystal_I2C lcd(0x27, 16, 2); // Set the LCD address to 0x27 for a 16 chars and 2 line display
unsigned long previousMillis = 0; // Stores last time the screen was updated
const long interval = 5000; // Interval at which to switch screens (milliseconds)
bool showHeatIndex = false;
void setup() {
lcd.init();
lcd.backlight();
lcd.setCursor(0, 0);
lcd.print("Electro Gadget");
delay(2000);
lcd.clear();
dht.begin();
}
void loop() {
unsigned long currentMillis = millis();
// Reading temperature and humidity
float h = dht.readHumidity();
float t = dht.readTemperature();
// Check if any reads failed and exit early (to try again).
if (isnan(h) || isnan(t)) {
lcd.setCursor(0, 0);
lcd.print("Failed to read");
lcd.setCursor(0, 1);
lcd.print("from DHT sensor");
return;
}
// Compute heat index in Celsius (isFahrenheit = false)
float hic = dht.computeHeatIndex(t, h, false);
if (currentMillis - previousMillis >= interval) {
previousMillis = currentMillis;
showHeatIndex = !showHeatIndex;
lcd.clear();
}
if (showHeatIndex) {
// Display heat index
lcd.setCursor(0, 0);
lcd.print("Heat Index:");
lcd.setCursor(0, 1);
lcd.print(hic);
lcd.print((char)223); // Degree symbol
lcd.print("C");
} else {
// Display temperature and humidity
lcd.setCursor(0, 0);
lcd.print("Temp: ");
lcd.print(t);
lcd.print((char)223); // Degree symbol
lcd.print("C");
lcd.setCursor(0, 1);
lcd.print("Humidity: ");
lcd.print(h);
lcd.print("%");
}
}