#include <DHT.h>
#include <LiquidCrystal_I2C.h>
#define DHT_PIN 4
#define DHTTYPE DHT22
DHT dht(DHT_PIN,DHTTYPE);
LiquidCrystal_I2C lcd(0x27, 20, 4);
void setup() {
// put your setup code here, to run once:
dht.begin();
lcd.init();
lcd.backlight();
}
void loop() {
// put your main code here, to run repeatedly:
int temp=dht.readTemperature();
int hum=dht.readHumidity();
lcd.setCursor(0,0);
lcd.print("Humidity:");
lcd.setCursor(10,0);
lcd.print(hum);
lcd.setCursor(12,0);
lcd.print("%");
lcd.setCursor(0,1);
lcd.print("Temp:");
lcd.setCursor(5,1);
lcd.print(temp);
lcd.setCursor(8,1);
lcd.print("degree");
delay(500);
}