#include <DHTesp.h>
DHTesp dhtSensor;
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
dhtSensor.setup(13, DHTesp::DHT22);
}
void loop() {
TempAndHumidity data = dhtSensor.getTempAndHumidity();
Serial.println("Temp: " + String(data.temperature, 2)+ "°C");
Serial.println("Humidity: " + String(data.humidity, 1)+ "%");
Serial.println("...");
delay(1000); // this speeds up the simulation
}