Temperature Monitor with DHT22 and I2C 16x2 LCD

It might be the simplest room temperature and humidity - no breadboard attached.

Apr 27, 2019

111170 views

51 respects

Components and supplies

1

Arduino UNO

1

I2C 16x2 Arduino LCD Display Module

1

9V to Barrel Jack Connector

1

DHT22 Temperature Sensor

7

Jumper wires (generic)

Apps and platforms

1

Arduino IDE

Project description

Code

humtemp

arduino

humtemp

arduino

Downloadable files

DHT22 LCD

DHT22 LCD

DHT22 LCD

DHT22 LCD

dht22 i2c Backpack

dht22 i2c Backpack

Comments

Only logged in users can leave comments

rivi2

a year ago

always error

EngrFahad

2 years ago

You have done a great job. I also did the same project, but I used the internet of things technology. I used Nodemcu esp8266 wifi module and sent the temperature, pressure, and altitude values to the Blynk application, i used the BMP180 sensor. you can check this project by clicking on the link below. http://www.electroniclinic.com/nodemcu-and-bmp180-temperature-pressure-altitude-internet-of-things-project-iot/

Anonymous user

2 years ago

Thank you for the easy to follow and well written code and project! I tried about 10 similar projects and could not get them to work. I'm new to Arduino and was getting a little frustrated. AS they say in the coding world "elegant."

Anonymous user

2 years ago

Does the Arduino Nano work instead of the Uno? I'm planning to put the Nano on a mini breadboard.

Anonymous user

2 years ago

I am new to Arduino and I am wondering if there was some way to use the LCD screen without that board that connects directly to it.

Anonymous user

2 years ago

i keep getting this error. i used the links and downloaded the code exit status 1 'int LiquidCrystal_I2C::init()' is private within this context

IoT_hobbyist

2 years ago

Delete the library you install and install new library according to the instruction in this tutorial: https://arduinogetstarted.com/tutorials/arduino-temperature-humidity-sensor-lcd

Anonymous user

2 years ago

this is the only tutorial that worked on the first try without debugging

Anonymous user

2 years ago

this is the only tutorial that worked on the first try without debugging

yaashodhan

2 years ago

i cant upload the code but my lcd screen was working.Can you help me

Anonymous user

2 years ago

Why is it that you might see in a sketch the reference in brackets like #include <RTClib.h>, and sometimes you see #include "RTClib.h". I see no difference in performance. Can you explain?

Anonymous user

2 years ago

For those who want Fahrenheit, go to the void loop() and find lcd.print(temp); Change this to lcd.print(temp/5*9+32); You will also want to update lcd.println("Celsius"); For mine, I changed it to lcd.println(" Fahr.");

Anonymous user

2 years ago

Dear Sir, I have planned our company server room AC temperature monitoring SMS alert system. But not familiar for this work I need your support. I have mention detailed requirement . what type of material need and how to enable. Any one support me. 1.we are maintaining 20°C server room temp always 2.over all 3 A/C running inside room. any one A/C fault temp increased 3.above 20°C increased I need auto SMS send to maintenance team (minimum 5Person) (SMS-Server room temp high) 4.daily morning one time room temp (present temp)send to SMS for team

Anonymous user

2 years ago

this is the only tutorial that worked on the first try without debugging

Anonymous user

2 years ago

Ja sam početnik. Ovo je jedini projekt koji je proradio kod mene. Hvala

HACKerNator

2 years ago

The following:"#include <dht.h>" is wrong it shoud be:"#include <DHT.h>".

Anonymous user

2 years ago

This is what I’d like to do except to use a very small and thin temp probe like the XSPC Wire Sensor 10K. Can I swap out the humidity/temp sensor and use a different sensor?

Anonymous user

2 years ago

I am very new at this so when I uploaded the code to the Arduino, the LCD lighted up but didn't show anything. Does anyone know how to fix this?

Anonymous user

2 years ago

I keep getting "dht" does not name a type from code line dht DHT; don't know why, I am very new to this.

Anonymous user

2 years ago

Works on first upload! Thank you very much!

yaashodhan

3 years ago

i cant upload the code but my lcd screen was working.Can you help me

Anonymous user

3 years ago

Does the Arduino Nano work instead of the Uno? I'm planning to put the Nano on a mini breadboard.

Anonymous user

4 years ago

Dear Sir, I have planned our company server room AC temperature monitoring SMS alert system. But not familiar for this work I need your support. I have mention detailed requirement . what type of material need and how to enable. Any one support me. 1.we are maintaining 20°C server room temp always 2.over all 3 A/C running inside room. any one A/C fault temp increased 3.above 20°C increased I need auto SMS send to maintenance team (minimum 5Person) (SMS-Server room temp high) 4.daily morning one time room temp (present temp)send to SMS for team

Anonymous user

4 years ago

Why is it that you might see in a sketch the reference in brackets like #include <RTClib.h>, and sometimes you see #include "RTClib.h". I see no difference in performance. Can you explain?

techspecs

4 years ago

For those who want Fahrenheit, go to the void loop() and find lcd.print(temp); Change this to lcd.print(temp/5*9+32); You will also want to update lcd.println("Celsius"); For mine, I changed it to lcd.println(" Fahr.");

boske78

4 years ago

Ja sam početnik. Ovo je jedini projekt koji je proradio kod mene. Hvala

Anonymous user

4 years ago

I am very new at this so when I uploaded the code to the Arduino, the LCD lighted up but didn't show anything. Does anyone know how to fix this?

Anonymous user

5 years ago

i keep getting this error. i used the links and downloaded the code exit status 1 'int LiquidCrystal_I2C::init()' is private within this context

IoT_hobbyist

2 years ago

Delete the library you install and install new library according to the instruction in this tutorial: https://arduinogetstarted.com/tutorials/arduino-temperature-humidity-sensor-lcd

Anonymous user

5 years ago

Works on first upload! Thank you very much!

Anonymous user

5 years ago

this is the only tutorial that worked on the first try without debugging

Anonymous user

5 years ago

I am very new to this and have run into many issues with other online projects. This code uploaded and everything is plugged in correctly but I was wondering if you can use this with the DHT11? Also with the code uploaded and everything plugged in I just get a glowing lcd. Thanks for the help

IoT_hobbyist

2 years ago

It is completely possible with DHT11. The important thing is to wire correctly and use the proper library. You can refer to the following tutorials: - Complete Guide about DHT11 and DHT22: https://arduinogetstarted.com/tutorials/arduino-temperature-humidity-sensor - Display Temperature on LCD I2C: https://arduinogetstarted.com/tutorials/arduino-temperature-sensor-lcd

Anonymous user

2 years ago

I have made it with the Elegoo DHT11: // DHTlib - Version: Latest #include <dht.h> //Libraries #include <dht_nonblocking.h> #define DHT_SENSOR_TYPE DHT_TYPE_11 static const int DHT11_PIN = 2; // sensor library using lib from https://www.ardumotive.com/how-to-use-dht-22-sensor-en.html #include <LiquidCrystal_I2C.h> // LCD library using from https://www.ardumotive.com/i2clcden.html for the i2c LCD library #include <Wire.h> dht DHT; //Constants LiquidCrystal_I2C lcd(0x27,16,2); // set the LCD address to 0x27 after finding it from serial monitor (see comment above) for a 16 chars and 2 line display //Variables float hum; //Stores humidity value float temp; //Stores temperature value void setup() { Serial.begin(9600); lcd.init(); // initialize the lcd // Print a message to the LCD. lcd.backlight(); lcd.setBacklight(HIGH); } void loop() { int chk = DHT.read11(DHT11_PIN); //Read data and store it to variables hum and temp hum = DHT.humidity; temp= DHT.temperature; //Print temp and humidity values to LCD lcd.setCursor(0,0); lcd.print("Humidity: "); lcd.print(hum); lcd.print("%"); lcd.setCursor(0,1); lcd.print("Temp: "); lcd.print(temp); lcd.println(" C "); delay(2000); //Delay 2 sec between temperature/humidity check. }

Anonymous user

5 years ago

I keep getting "dht" does not name a type from code line dht DHT; don't know why, I am very new to this.

HACKerNator

5 years ago

The following:"#include <dht.h>" is wrong it shoud be:"#include <DHT.h>".

Anonymous user

5 years ago

Thank you for the easy to follow and well written code and project! I tried about 10 similar projects and could not get them to work. I'm new to Arduino and was getting a little frustrated. AS they say in the coding world "elegant."

Anonymous user

5 years ago

This is what I’d like to do except to use a very small and thin temp probe like the XSPC Wire Sensor 10K. Can I swap out the humidity/temp sensor and use a different sensor?

EngrFahad

5 years ago

You have done a great job. I also did the same project, but I used the internet of things technology. I used Nodemcu esp8266 wifi module and sent the temperature, pressure, and altitude values to the Blynk application, i used the BMP180 sensor. you can check this project by clicking on the link below. http://www.electroniclinic.com/nodemcu-and-bmp180-temperature-pressure-altitude-internet-of-things-project-iot/

Anonymous user

5 years ago

I am new to Arduino and I am wondering if there was some way to use the LCD screen without that board that connects directly to it.