#include <LiquidCrystal_I2C.h>
#include <Wire.h>
#include <DHT.h>
#define DHTTYPE DHT22
#define DHTPIN 2
DHT dht(DHTPIN,DHTTYPE);
LiquidCrystal_I2C lcd(0x27,16,2);
void setup() {
dht.begin();
lcd.init();
lcd.backlight();
Serial.begin(9600);
// put your setup code here, to run once:
}
void loop() {
float t=dht.readTemperature();
float f=dht.readTemperature(true);
float h=dht.readHumidity();
lcd.setCursor(0,0);
lcd.print(t);
lcd.setCursor(0,1);
lcd.print(h);
delay(5000);
Serial.println(t);
Serial.println(f);
Serial.println(h);
lcd.clear();
// put your main code here, to run repeatedly:
}