Introduction: Temperature and Humidity Sensor With Arduino and Lcd Display

Hello guys, Welcome back to Artuino. As you have Seen I have started An Instructable

Today we are going to make a Temperature & Humidity meter with the DHT11 module. Let's get started

P.S. Consider Subscribing and liking the video

Step 1: Connection

Follow this Diagram

after connection, it will look like this

Step 2: Code

This is the code that I usd for my project

#include //include the lcd library
const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2; LiquidCrystal lcd(rs, en, d4, d5, d6, d7);

#include "dht.h"// include the the dht sensor library

#define DHT_pin A0// give a name to the sensor pin and A0

dht DHT;//initialize the sensor

void setup(){

lcd.begin(16, 2);//initialize the senso

Serial.begin(9600);// start the Serial communication

delay(500);//Delay to let system boot

Serial.println("DHT11 Humidity & temperature Sensor\n\n");

delay(1000);//Wait before accessing Sensor

}


void loop(){

DHT.read11(DHT_pin);//Read the Sensor pin

Serial.print("humidity = ");//print the humidity in the Serial Monitor

Serial.print(DHT.humidity);

Serial.print("% ");

Serial.print("temperature = ");

Serial.print(DHT.temperature); //to print temperature on the Serial monitor

Serial.println("C ");

lcd.setCursor(0,0);

lcd.print("humidity=");//to print humidity on the lcd

lcd.print(DHT.humidity);

lcd.print("% ");

lcd.setCursor(0,2);

lcd.print("temp = ");//to print temperature on the lcd

lcd.print(DHT.temperature);

lcd.println("C ");

delay(3000);//Wait 3 seconds before accessing sensor again.

}

Step 3: Output

I tried various things with it.

When I placed ice near it the temperature cooled down.

& and when a blew warm air into it, the temperature increased

Step 4: LIKE, SHARE & SUBSCRIBE