Arduino Temperature And Humidity Sensor Code

Work fine dht code from.
Arduino temperature and humidity sensor code. They are similar to each other. Temperature and humidity readings are measured by the help of arduino uno and dht11 sensor. Include dht h dht dht. 10k ohm pull up resistor.
For instance i used a0 so you need to connect the sensor to the analog pin a0. 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. How to use the dht11 temperature and humidity sensor with an arduino. The materials are here as follows.
In this project we will use the ky 015 arduino dht11 temperature humidity sensor and display it to the arduino ide serial monitor. Hi use below code and usage the default dht h from arduino libraries. Display humidity and temperature on the serial monitor. Arduino uno any uno will work i have a geekcreit uno.
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. This project is really simple and shouldn t take us very long. Include ethercard h ethernet interface mac address must be unique on the lan.
Example testing sketch for various dht humidity temperature sensors written by ladyada public domain. Dht11 digital temperature humidity sensor delivers temperatures between 0 c and 50 c and humidity between 0 to 100. Dht11 humidity temperature sensor. The dht11 temperature and humidity sensor senses measures and regularly reports the relative humidity in the air.
The warmer the air is the more moisture it can hold so relative humidity changes with fluctuations in the temperature. The code that i have written records the temperature and humidity for all 3 sensors after every 3 seconds. It is very inexpensive but it gives values of both temperature and humidity at a time. An 8 bit mcu is also connected in it which is responsible for its fast response.
The dht11 data pin is connected with arduino digital io pin. 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. I am using arduino huzzah feather for sht85 sensor. Arduino reads the temperature and humidity at 2 second interval and sends to the serial port.
The temperature accuracy is 2 c maximum. It measures both moisture and air temperature.