#include"DHTesp.h"
const int tem=15;
DHTesp dhtSensor;
TempAndHumidity data;
void setup() {
Serial.begin(115200);
pinMode(tem, INPUT);
dhtSensor.setup(tem,DHTesp::DHT22);
}
void loop() {
data = dhtSensor.getTempAndHumidity();
Serial.println("Humidity:"+String(data.humidity,1));
Serial.println("Temp:"+String(data.temperature,2));
Serial.println(("__________________"));
delay(1000);
}