DHT11

TINKS035

  1. DHT11 Digital temperature and humidity sensor is a composite Sensor contain a calibrated digital signal output of the temperature and humidity.
  2. It provides a Digital Output.
Features:-
  1. Accuracy: At 25℃
  2. Low cost
  3. 5V DC operating voltage.
  4. I/O pins are 5V and 3.3V compliant.
  5. Long-term stability
  6. Relative humidity and temperature measurement
  7. Excellent quality
  8. Fast response
  9. Strong anti-interference ability
  10. Long-distance signal transmission
  11. Digital signal output
  12. Precise calibration.
Applications:-
  1. Dehumidifier
  2. Testing and inspection equipment
  3. Consumer goods
  4. Data loggers
  5. Weather stations
  6. Home appliances
  7. Humidity regulator

    

#include <dht.h>
dht DHT;
int dhtPin = 8; //Data pin of DHT-11 to Arduino digital pin 8

int chk;
float hum; //Stores humidity value
float temp; //Stores temperature value

void setup()
{
Serial.begin(9600);
}

void loop()
{
DHT.read11(dhtPin); //Check data pin and read values
//Read data and store it to variables hum and temp
hum = DHT.humidity;
temp= DHT.temperature;
//Print temp and humidity values to serial monitor
Serial.print("Humidity: ");
Serial.print(hum);
Serial.print(" %, Temp: ");
Serial.print(temp);
Serial.println(" Celsius");
delay(2000); //Delay 2 sec.
}