#include <LiquidCrystal_I2C.h>
#include "DHT.h";
LiquidCrystal_I2C lcd (0x27, 6, 2);
#define DHTPIN 2
#define DHTTYPE DHT22
DHT dht(DHTPIN, DHTTYPE);
void setup() {
dht.begin();
lcd.begin(16,2);
lcd.setCursor(1,0);
lcd.init();
lcd.backlight();
}
void loop() {
float h = dht.readHumidity();
float t = dht.readTemperature();
lcd.setCursor(0,0);
lcd.print("Suhu:" + String(t,1) + " " + (char)223 + "C");
lcd.setCursor(0,1);
lcd.print("Kelembaban:" + String(h,1) + "%");
delay(5000);
}