Basically, dht11 sensor is a humidity temperature sensor, which has a capacitive, humidity sensor and then thermistor to measure the surrounding air. So lets start the project. The dht11 sensor is as same as the sound sensor. It consists of three pins vcc ground and out. These three pins have to be connected to arduino 5 volt ground and a digital pin lets start wiring. First connect three wires to the sensor. The first pin from the right of the sound sensor is a ground pin connected to the ground. Pin of the arduino uno, the middle pin or vcc is the power pin of the temperature sensor connected to 5 volt of arduino? The last pin is the digital pin or out pin of the sensor connected to a digital pin of the arduino uno. I have chosen the digital pin 2. now that we finished wiring it lets program. So friends, now its coding time here in the first line, i have included a library dht.h, its the library of the temperature sensor, now ill show you how to install a library sketch include libraries, manage libraries or shortcut key ctrl shift. I it takes some time to load Music Music right, as you can see. I already installed this library when you get this library, select the latest version and install it else. This code wont work right now. I have defined that the temperature sensor is connected to digital pin 2 of arduino uno. The void setup is as same as before then comes white loop in chk check short form, equal to dhc dot, read 11 m.

It tells the arduino to send a message to the temperature sensor to read the temperature and humidity surrounding it then comes serial dot print temperature. Equal to this sentence will be printed on the serial monitor, then, just next to that the temperature will be print. The temperature from the temperature sensor will be printed then, just over the next line, humidity equal to and then just next to that, dht dot, humidity, the humidity calculated or measured will be printed. Then we have kept a delay for 2000. As you know, the uh board works really fast. We are so we cannot read it so we have kept two seconds of gap right so now lets test it Music. Now that we have uploaded the code lets test, it now lets test it im opening my serial monitor Music. As you can see, all the temperatures and humidity is being printed on the serial monitor with a delay of 2 seconds Music right. So friends that was all for today, if you like our video, please like and share to people, you know, are interested in the topics like these.