DHT11 Temperature and Humidity Sensor
Internal Reference:
SEN-023
DHT11 Temperature and Humidity Sensor.
The DHT11 sensor includes a resistive-type humidity measurement component, with an NTC temperature measurement component, and a high-performance 8-bit microcontroller inside, and provides calibrated digital signal output. It has high reliability and excellent long-term stability, thanks to the exclusive digital signal acquisition technique and temperature & humidity sensing technology.
Each DHT11 is strictly calibrated in the laboratory which is extremely accurate in humidity calibration. The calibration coefficients are stored as a program in the OTP memory, which is used by the sensor’s internal signal detecting process. The single-wire serial interface makes system integration quick and easy. Its small size, low power consumption, and up-to-20 meter signal transmission make it the best choice for various applications, including those most demanding ones.
DHT11 Temperature and Humidity Sensor Specification:
Power Supply: 3.3~5.5V DC
Output: 3 pin single row
Measurement Range: Humidity 20-90%RH, Temperature 0~50℃
Accuracy: Humidity +-5%RH, Temperature +-2℃
Resolution: Humidity 1%RH, Temperature 1℃
Interchangeability: Fully Interchangeable
Long-Term Stability: <±1%RH/year

Library: DHT.zip

Sketch
#include <dht.h>
#define dht_dpin A0 //no ; here. Set equal to channel sensor is on
dht DHT;
void setup(){
Serial.begin(9600);
delay(300);//Let system settle
Serial.println("Humidity and temperaturenn");
delay(700);//Wait rest of 1000ms recommended delay before
//accessing sensor
}//end "setup()"
void loop(){
//This is the "heart" of the program.
DHT.read11(dht_dpin);
Serial.print("Current humidity = ");
Serial.print(DHT.humidity);
Serial.print("% ");
Serial.print("temperature = ");
Serial.print(DHT.temperature);
Serial.println("C ");
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()