#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 2);
#include <DHT.h>
#define datapin 5
#define DHTTYpe DHT22
DHT dht (5,DHTTYpe);
void setup() {
// set up the LCD's number of columns and rows:
Serial.begin(9600);
lcd.init();
lcd.backlight();
dht.begin();
lcd.clear();
}
void loop() {
delay(100);
int h= dht.readHumidity();
float t = dht.readTemperature();
lcd.setCursor(0,0);
lcd.print("Suhu = ");
lcd.print(t);
lcd.setCursor(0,1);
lcd.print("Kelembapan = ");
lcd.print(h);
}