#include <DHTesp.h>
int dp = 18;
DHTesp ds;
TempAndHumidity th;
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
ds.setup(dp,DHTesp::DHT22);
Serial.println("Hello, ESP32!");
}
void loop() {
// put your main code here, to run repeatedly:
th = ds.getTempAndHumidity();
Serial.println("Humidity : "+String(th.humidity,1));
Serial.println("Temperature : "+String(th.temperature,2));
delay(10); // this speeds up the simulation
}