Humidity & Temperature Basic Sensor DHT11
- Was RM13.00
-
RM8.00
- Product Code: Humidity DHT11
- Availability: In Stock
The DHT11 is a basic 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). Its fairly simple to use, but requires careful timing to grab data. The only real downside of this sensor is you can only get new data from it once every 2 seconds, so when using our library, sensor readings can be up to 2 seconds old.
Features
A 4.7K or 10K resistor is required, for use as a pullup from the data pin to VCC.
Below is an Arduino example sketch to connect and display temperature in 16 x 02 LCD display:
Connect DATA pin to Arduino analog A0-pin #include <Wire.h> // builtin library #include <LiquidCrystal.h> // builtin library LiquidCrystal lcd(8, 9, 4, 5, 6, 7); // sainsmart 1602 lcd #include <dht11.h> // download this from http://playground.arduino.cc/main/DHT11Lib dht11 DHT; void setup(){ lcd.begin(16, 2); } void loop(){ DHT.read(A5); lcd.print(DHT.temperature); // Celsius output delay(1000); // DHT11 can't poll faster than 1x a second }
Tags: Humidity, Temperature