Professional Documents
Culture Documents
#define DHTTYPE DHT11 //--> Defines the type of DHT sensor used (DHT11, DHT21, and
DHT22), in this project the sensor used is DHT11.
const int DHTPin = 2; //--> The pin used for the DHT11
DHT dht(DHTPin, DHTTYPE); //--> Initialize DHT sensor, DHT dht(Pin_used,
Type_of_DHT_Sensor);
//----------------------------------------Setup
void setup(){
Serial.begin(9600);
delay(100);
dht.begin(); //--> Start reading DHT11 sensors
}
//----------------------------------------Loop
void loop(){