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