#include "DHTesp.h"
DHTesp dhtSensor;
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
const int DHT_PIN = 19;
dhtSensor.setup(DHT_PIN, DHTesp::DHT22);
Serial.println("Temperature, Humidity");
}
void loop() {
// put your main code here, to run repeatedly:
delay(10); // this speeds up the simulation
delay(500);
TempAndHumidity data = dhtSensor.getTempAndHumidity();
Serial.println(String(data.temperature, 2) + "," + String(data.humidity, 2));
}