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