#include<DHTesp.h>
DHTesp sensor;
TempAndHumidity data;
int pin = 27;
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
sensor.setup(pin,DHTesp::DHT22);
}
void loop() {
data=sensor.getTempAndHumidity();
Serial.println(String(data.temperature)+" This is temperature value ");
Serial.println(String(data.humidity)+" This is humanity value ");
// put your main code here, to run repeatedly:
delay(2000); // this speeds up the simulation
}