#include <DHT.h>
#include <LiquidCrystal_I2C.h>
DHT dht(A0 ,DHT22);
LiquidCrystal_I2C lcd( 0x27 , 16 , 2 );
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:
float Suhu = dht.readTemperature();
// float suhu = dht.Humidity();
float lembab = dht.readHumidity();
// float suhu = dht.Temperature();
lcd.setCursor(2,0);
lcd.print("Suhu: ");
lcd.print(Suhu);
lcd.print((char)223);
lcd.print("C");
lcd.setCursor(0,1);
lcd.print("Lembab: ");
lcd.print(lembab);
lcd.print((char)223);
lcd.print("%");
}