#include "DHT.h"
#define DHTPIN 26
#define DHTTYPE DHT22
DHT dht(DHTPIN, DHTTYPE);
void setup() {
pinMode(32,OUTPUT);
// put your setup code here, to run once:
Serial.begin(115200);
Serial.println("Hello, ESP32!");
dht.begin();
}
void loop() {
float temperature = dht.readTemperature();
if(temperature>=40){
digitalWrite(32,HIGH);
// put your main code here, to run repeatedly:
delay(1000);}
else{ // this speeds up the simulation
digitalWrite(32,LOW);
delay(1000);} // this speeds up the simulation
}