• Home
  • Archive
  • Tools
  • Contact Us

The Customize Windows

Technology Journal

  • Cloud Computing
  • Computer
  • Digital Photography
  • Windows 7
  • Archive
  • Cloud Computing
  • Virtualization
  • Computer and Internet
  • Digital Photography
  • Android
  • Sysadmin
  • Electronics
  • Big Data
  • Virtualization
  • Downloads
  • Web Development
  • Apple
  • Android
Advertisement
You are here:Home » Arduino Temperature & Humidity Sensor DHT 11 With LCD 1602A

By Abhishek Ghosh January 8, 2018 6:17 pm Updated on January 8, 2018

Arduino Temperature & Humidity Sensor DHT 11 With LCD 1602A

Advertisement

Previously, we published guide on how to setup LCD 1602A with Arduino, print Arduino Temperature Humidity Sensor reading on serial display. This guide, simply combining those two guides in the same way we combined two guides on our Arduino basic light meter guide. In This Guide, We Will create a Arduino Temperature & Humidity Sensor DHT 11 With LCD 1602A Following Few Steps. A the end of this guide, you’ll get the below photograph like thing :

Arduino Temperature & Humidity Sensor DHT 11 With LCD 1602A

We are using Arduino Web IDE for compilation and uploading code. You’ll also get the code, circuit diagram of this project on below URLs :

Vim
1
2
https://create.arduino.cc/editor/abhishekghosh/73771c60-f926-4b22-8b71-310b81583e4a/preview
https://gist.github.com/AbhishekGhosh/7574d7d47acc86318a286d6dbbfdbe52

 

Arduino Temperature & Humidity Sensor DHT 11 With LCD 1602A

 

Needed components :

Advertisement

---

  1. Arduino UNO or similar dev board
  2. Breadboard
  3. Jumpers
  4. 10K Ohm Potentiometer
  5. DHT 11 or similar sensor

 

Here is the circuit diagram :

Arduino DHT 11 With LCD 1602A

Exactly like the previous guides, first setup the LCD. We will adjust the contrast with potentiometer – so that is an important thing.

Pin 1 on LCD (VSS) will connect to GND of Arduino
Pin 16 on LCD (K) will connect to GND of Arduino
Pin 2 on LCD (VDD) will connect to +5v of Arduino
Pin 15 on LCD (A) will connect to +5v of Arduino

With the above connection if you connect Arduino with computer, the LCD will light up. Next, disconnect from computer and add the potentiometer :

First pin of the potentiometer will go to GND of Arduino
Pin 3 of the LCD display (VO) will connect to the middle pin of the potentiometer

With the above connection, again connect your Arduino with computer, the LCD will light up. Adjust the potentiometer and you’ll be able to see from blank to white all units like [] [] [] []. That [] [] [] [] is full contrast and blank is minimum contrast.

Pin 4 of the LCD display (RS) will connect to Pin 7 of Arduino
Pin 5 of the LCD display (RW) will connect to GND of Arduino
Pin 6 of the LCD display (E) will connect to Pin 8 of Arduino
Pin 11 of the LCD display (D4) will connect to Pin 9 of Arduino
Pin 12 of the LCD display (D5) will connect to Pin 10 of Arduino
Pin 13 of the LCD display (D6) will connect to Pin 11 of Arduino
Pin 14 of the LCD display (D7) will connect to Pin 12 of Arduino

If you use 1, 2, 3, 4 numbers of breadboard, you’ll not get confused. With the above connection again connect Arduino with computer. Next step is connecting the DHT 11 sensor. That is easy.

VCC – connect to 5v of Arduino, first pole from extreme left from front-side
Data – to connect with A0 pin of Arduino, second pole from extreme left from front-side
NC – not needed to do anything
GND – to connect with GND of Arduino, last pole from extreme left from front-side

This is the code :

Vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#include <LiquidCrystal.h>
#include <Adafruit_Sensor.h>
#include <DHT.h>
#include <DHT_U.h>
#define DHTPIN            A0         // Pin which is connected to the DHT sensor.
// type the model of sensor in use, we are using DHT 11, if you are using DHT 21 or DHT 22 change it
#define DHTTYPE           DHT11    
DHT_Unified dht(DHTPIN, DHTTYPE);
 
LiquidCrystal lcd(7, 8, 9, 10, 11 , 12);
 
void setup()
{
dht.begin();
lcd.begin(16,2); //16 by 2 character display
sensor_t sensor;
dht.temperature().getSensor(&sensor);
}
 
void loop()
{
delay(1000); //wait a sec (recommended for DHT11)
sensors_event_t event;  
dht.temperature().getEvent(&event);
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Temp= ");
lcd.print(event.temperature);
lcd.print(" *C");
lcd.setCursor(0,1);
dht.humidity().getEvent(&event);
lcd.print("Humidity= ");
lcd.print(event.relative_humidity);
lcd.print("%");
}

The above is 100% working code tested on January 2018. The reason peoples face issues with DHT 11 is out of not properly using the needed libraries. From Arduino Web IDE, you’ll not need to install any libraries. What libraries to install on local computer’s Arduino IDE, that is discussed on the previous basic guides linked at the beginning of this article.

Tagged With Arduino Temp and humidity DHT11 CH1602 LCD , paperuri:(3b07b32b5c4b7fa2295bad2975c40688) , dht11 arduino display 1602a , Arduino temperature & humidity DHT11 CH1602 LCD , 1602a diagram , dht11 and display 1602 connection to arduino , print humididt and temp to 1602a arduino , dht11 lcd 1602 arduino скетч , arduino dht 11 und lcd 1602 deutsch , arduino 1602A temperature
Facebook Twitter Pinterest

Abhishek Ghosh

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, Surgeon, Author and Blogger. You can keep touch with him on Twitter - @AbhishekCTRL.

Here’s what we’ve got for you which might like :

Articles Related to Arduino Temperature & Humidity Sensor DHT 11 With LCD 1602A

  • Arduino With DHT 11 Sensor and Arduino Online IDE : Basic IoT

    Arduino With DHT 11 Sensor and Arduino Online IDE is Example of Basic IoT Which Needs No Special Hardware But Arduino, DHT11, Internet Connection & Web Browser.

  • Arduino Temperature Humidity Sensor : New DHT11, DHT21, DHT22 Test Code

    Here is New Test Codes For Arduino Temperature Humidity Sensor DHT11, DHT21, DHT22 Test Code as Hardware (Not Shields). 2 Libraries Needed.

  • Connecting ESP32 Arduino with DHT11 with IBM Watson IoT

    Earlier, we described how to create graph on IBM Watson IoT dashboard by using the default widgets. In previous guide, we described how to use ESP32 Arduino with DHT11 sensor. Here is the Code and Diagram to Connect ESP32 Arduino with DHT11 with IBM Watson IoT and Get Odometer Like Gauges on Dashboard. For this […]

  • Nginx WordPress Installation Guide (All Steps)

    This is a Full Nginx WordPress Installation Guide With All the Steps, Including Some Optimization and Setup Which is Compatible With WordPress DOT ORG Example Settings For Nginx.

performing a search on this website can help you. Also, we have YouTube Videos.

Take The Conversation Further ...

We'd love to know your thoughts on this article.
Meet the Author over on Twitter to join the conversation right now!

If you want to Advertise on our Article or want a Sponsored Article, you are invited to Contact us.

Contact Us

Subscribe To Our Free Newsletter

Get new posts by email:

Please Confirm the Subscription When Approval Email Will Arrive in Your Email Inbox as Second Step.

Search this website…

 

Popular Articles

Our Homepage is best place to find popular articles!

Here Are Some Good to Read Articles :

  • Cloud Computing Service Models
  • What is Cloud Computing?
  • Cloud Computing and Social Networks in Mobile Space
  • ARM Processor Architecture
  • What Camera Mode to Choose
  • Indispensable MySQL queries for custom fields in WordPress
  • Windows 7 Speech Recognition Scripting Related Tutorials

Social Networks

  • Pinterest (24.3K Followers)
  • Twitter (5.8k Followers)
  • Facebook (5.7k Followers)
  • LinkedIn (3.7k Followers)
  • YouTube (1.3k Followers)
  • GitHub (Repository)
  • GitHub (Gists)
Looking to publish sponsored article on our website?

Contact us

Recent Posts

  • Hybrid Multi-Cloud Environments Are Becoming UbiquitousJuly 12, 2023
  • Data Protection on the InternetJuly 12, 2023
  • Basics of BJT TransistorJuly 11, 2023
  • What is Confidential Computing?July 11, 2023
  • How a MOSFET WorksJuly 10, 2023
PC users can consult Corrine Chorney for Security.

Want to know more about us?

Read Notability and Mentions & Our Setup.

Copyright © 2023 - The Customize Windows | dESIGNed by The Customize Windows

Copyright  · Privacy Policy  · Advertising Policy  · Terms of Service  · Refund Policy