#include "DHTesp.h"
const int pin = 13;
DHTesp dhtsensor;
TempAndHumidity data;
void setup() {
Serial.begin(115200);
dhtsensor.setup(pin,DHTesp::DHT22);
}
void loop() {
data = dhtsensor.getTempAndHumidity();
Serial.println("temp" + String(data.temperature,1));
Serial.println("Humi" + String(data.humidity,1));
Serial.println("----------------------");
delay(1000);
}