#include <DHTesp.h>
#include <LiquidCrystal_I2C.h>
DHTesp dhtSensor;
LiquidCrystal_I2C lcd(0x27, 16, 2);
void setup() {
dhtSensor.setup(25, DHTesp::DHT22);
lcd.init();
lcd.backlight();
}
void loop() {
TempAndHumidity data = dhtSensor.getTempAndHumidity();
lcd.setCursor(0,0);
lcd.print("Suhu: ");
lcd.print(String(data.temperature, 1));
lcd.print(String(char(223))+"C");
lcd.setCursor(0,1);
lcd.print("Lembap: ");
lcd.print(String(data.humidity, 1));
lcd.print("%");
delay(500);
}