Arduino Tutorial 50: How to Connect and Use the DHT11 Temperature and Humidity Sensor

In this lesson we show how to measure Temperature and Humidityusing the DHT11 sensor. This is a relatively simple sensor to use, but you will have to download and install a library. In our earlier lessons, we have used libraries before, but this is the first time you will have to download a library. The library I used was downloaded from HERE. The video explains in detail how to install the library, but in a nutshell you download the library from clicking the link on that page. Then you need to open the downloaded zip file, and then drag and drop the contents of the zip file to your desktop. Next you must determine where your arduino library folder is. You can do that by going to the arduino IDE, and under “file” select preferences. This will show you your “Sketchbook Location”, and that folder will contain your libraries folder. The folder you dragged and dropped onto your desktop should be dragged and dropped now into this library folder. The video shows you how to do this if this description is not clear. Now you will need to connect the sensor, according to this schematic:

Connection schematic for the DHT11 Temperature Sensor.

The video develops the code to use this sensor step-by-step, but the code is included below for your convenience.