Introduction: DHT11 Humidity Sensor With a Lcd Display Easy!!

Picture of DHT11 Humidity Sensor With a Lcd Display Easy!!

Hi, guys today we are going to make humidity sensor DHT11 work it with a LCD display.

It is not hard for a beginner just wiring the LCD display is the hard part.

So lets start:):):):):):):):)!!!!!!!!!!

Step 1: Gather Your Body Parts

Picture of Gather Your Body Parts

You will need :

1. DHT11 humidity sensor module

2. LCD display (i have given a code for I2C too)

3. Arduino (I used a UNO)

4. potentiometer

5. wires

Step 2: Join Your Body Parts

Picture of Join Your Body Parts

The DHT11 sensor pins are:

1. GND to GND

2. VCC to 5V

3. S to pin 11 (on the Arduino)

The LCD pins are:

LCD Pin # LCD PIN NAME Arduino Pin

1 VSS GND

2 VDD 5V

3 V0 Potentiometer Center Pin

4 RS 10

5 RW GND

6 E 9

7,8,9,10 not connected

11 DB4 Pin 5

12 DB5 Pin 4

13 DB6 Pin 3

14 DB7 Pin 2

15 Backlight LED +V 5V

16 Backlight LED GND GND

The potentiometer left pin will go to 5V and right to GND

Step 3: GIve a Messege to Your Brian to Work

Picture of GIve a Messege to Your Brian to Work

the codes are:

Step 4: Body Functioning Properly

Picture of Body Functioning Properly

Finished

plz follow me:):):):):):):):):)

Comments

Verkoda (author)2017-03-10

Has anyone experienced the "#include <Adafruit_Sensor.h>" error?

matthew99997 made it! (author)2016-03-26

Thanks for the great instructable!

However, I found that the code you provided would not work for me. I kept getting errors. After some searching and trial & error, I fixed it. I'm not sure if it was just me with the errors or not, but in case someone else tries it, here is the "revised" code that worked for me:

#include <LiquidCrystal.h> // load lib
#include <DHT.h> // load lib

LiquidCrystal lcd(10,9,5,4,3,2); // make a lcd object

#define dht_apin 11
#define dht_type DHT11
DHT dht(dht_apin, dht_type); // sensor pin S to pin11

void setup() {

lcd.begin(16,2); // to tell arduino there are 16 colunms and 2 rows
}

void loop(){
float h = dht.readHumidity();
float f = dht.readTemperature();
lcd.setCursor(0,0); // row 1
lcd.print(" Humidity = "); // print on the lcd Humidity =
lcd.print(h); // to print the humidity
lcd.setCursor(14,0); //set cursor just after humidity integer (no decimals)
lcd.print("% "); //print "percentage" symbol

lcd.setCursor(0,1);
lcd.print(" Temp = "); // print on the lcd temp =
lcd.print(f); // print on the lcd temperture
lcd.setCursor(10,1); //take out deceimal places on temp
lcd.print((char)223); // print "degrees" symbol
lcd.println("C "); // print "C" with spaces after to fill 16 character line
delay (2000); // delay
}

FYI - I never would have figured out the wiring without this instructable. Thanks again.

omerk35 (author)matthew999972016-10-13

Acually i think it was the wiring problem in the code

About This Instructable

2,717views

35favorites

License:

Add instructable to: