Display humidity and temperature on the serial monitor.
Arduino temperature and humidity sensor code.
I have three such sensors connected to the huzzah with the adafruit tca 9548a multiplexer.
Dht11 sensor is used to measure the temperature and humidity.
How to use the dht11 temperature and humidity sensor with an arduino.
10k ohm pull up resistor.
Example testing sketch for various dht humidity temperature sensors written by ladyada public domain.
It measures both moisture and air temperature.
It has a resistive humidity sensing component and a negative temperature coefficient ntc.
This project is really simple and shouldn t take us very long.
The warmer the air is the more moisture it can hold so relative humidity changes with fluctuations in the temperature.
Arduino uno any uno will work i have a geekcreit uno.
For instance i used a0 so you need to connect the sensor to the analog pin a0.
Hi use below code and usage the default dht h from arduino libraries.
I am using arduino huzzah feather for sht85 sensor.
An 8 bit mcu is also connected in it which is responsible for its fast response.
The materials are here as follows.
Include dht h dht dht.
Try changing the analog pin for the sensor in the code or unplug the sensor and plug it back into the analog pin that is used in the code.
Dht11 humidity temperature sensor.
The dht11 data pin is connected with arduino digital io pin.
The temperature accuracy is 2 c maximum.
Arduino reads the temperature and humidity at 2 second interval and sends to the serial port.
Temperature and humidity readings are measured by the help of arduino uno and dht11 sensor.
It is very inexpensive but it gives values of both temperature and humidity at a time.
The dht11 temperature and humidity sensor senses measures and regularly reports the relative humidity in the air.
Dht11 digital temperature humidity sensor delivers temperatures between 0 c and 50 c and humidity between 0 to 100.
Include ethercard h ethernet interface mac address must be unique on the lan.
Before you can use the dht11 on the arduino you ll need to install the dhtlib library it has all the functions needed to get the humidity and temperature readings from the sensor.
You can choose one of them depending on your needs if you only want to get temperature we recommend using a waterproof ds18b20 temperature sensor instead.
Work fine dht code from.
Dht11 and dht22 are sensors that we can use to measure temperature and humidity.