#include<DHTesp.h>
DHTesp dhtsensor;
TempAndHumidity data;
const int DHT_PIN = 27;
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Serial.println("Hello, ESP32!");
dhtsensor.setup(DHT_PIN,DHTesp::DHT22);
}
void loop() {
// put your main code here,to run repeatedly;
data = dhtsensor.getTempAndHumidity();
Serial.println("Humi:"+ String(data.humidity,1));
Serial.println("Temp:"+ String(data.temperature,2));
delay(1000);
delay(10);// this speeds up the simulation
}