DHT-11 Humidity Sensor
The DHT11 is a basic, ultra low-cost digital temperature and humidity sensor. It uses a capacitive humidity sensor and a thermistor to measure the surrounding air, and spits out a digital signal on the data pin (no analog input pins needed).
* 3 to 5V power and I/O
* 2.5mA max current use during conversion (while requesting data)
* Good for 20-80% humidity readings with 5% accuracy
* Good for 0-50 C temperature readings +- 2 C accuracy
* No more than 1 Hz sampling rate (once every second)
* 15.5mm x 12mm x 5.5mm
* 4 pins with 0.1" spacing
#define dht_dpin A0 //no ; here. Set equal to channel sensor is on
delay(300);//Let system settle
Serial.println("Humidity and temperature\n\n");
delay(700);//Wait rest of 1000ms recommended delay before
//This is the "heart" of the program.
Serial.print("Current humidity = ");
Serial.print("temperature = ");
delay(800);//Don't try to access too frequently... in theory
//should be once per two seconds, fastest,
//but seems to work after 0.8 second.
}// end loop()