#include "DHTesp.h"
#include <LiquidCrystal_I2C.h>
int DHT_PIN = 15;
float temperature = 0;
LiquidCrystal_I2C LCD(0x27, 16, 2);
DHTesp dhtSensor;
void setup() {
Serial.begin(9600);
dhtSensor.setup(DHT_PIN, DHTesp::DHT22);
LCD.init();
LCD.backlight();
}
void loop() {
LCD.clear();
TempAndHumidity data = dhtSensor.getTempAndHumidity();
temperature = data.temperature;
humidity = data.humidity
if (temperature < 36)
LCD.print("Temp is LOW");
else
LCD.print("Temp is HIGH");
delay(1000);
}