#include <DHTesp.h>
DHTesp sensor;
TempAndHumidity data;
int pin=12;
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");
Serial.println(String(data.humidity)+" This Is Humidity");
// put your main code here, to run repeatedly:
delay(2000); // this speeds up the simulation
}