#include <DHTesp.h>
#include <LiquidCrystal_I2C.h>
DHTesp dhtSensor;
LiquidCrystal_I2C lcdSaya(0x27, 16, 2);
void setup() {
dhtSensor.setup(27, DHTesp::DHT22);
lcdSaya.init();
lcdSaya.backlight();
}
void loop() {
TempAndHumidity data = dhtSensor.getTempAndHumidity();
lcdSaya.setCursor(0,0);
lcdSaya.print("Suhu: ");
lcdSaya.print(String(data.temperature, 1));
lcdSaya.setCursor(0,1);
lcdSaya.print("Lembab: ");
lcdSaya.print(String(data.humidity, 1));
delay(2000);
}