#include "DHT.h"
#define DHTTYPE DHT22 // DHT 22 (AM2302), AM2321
uint8_t DHTPin = 14;// pino sensor temperatura
DHT dht(DHTPin, DHTTYPE);
float temperatura;
float umidade;
bool led=0;
bool rl1=0;
bool leitsensor;
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
delay(100);
pinMode(DHTPin, INPUT 14);// entrada do sensor pino 14
dht.begin();
pinMode(4,INPUT);//pino do botão
pinMode (2,OUTPUT);// pino led vermelho
pinMode (12,OUTPUT); //pino led roxo
}
void loop() {
sensorDHT22();
delay(1000);
}