Hey guys!
In this video I’m showing you how to use the KY-015 Temperature and humidity sensor
module which contains the DHT11 temperature and humidity sensor.
Along with the sensor I’m using an arduino uno, some jumper wires and a breadboard.
First of all, something I want to make clear.
The DHT11 can also be used in its bare form but it’s easier to use it as a module.
This video focuses on how to use the module.
There are a few different modules with varying pinouts and location of the pins.
On the module I have, the KY-015, the leftmost pin is signal, the middle pin is 5 volts power
and the rightmost pin is negative or ground.
If you have a different module, you may need to google and find out the pinout of your
one.
So I’m making the connections, the signal pin to pin 7 of the Arduino, the 5 volt power
to the 5 volt pin of the arduino and the negative pin to the ground pin of the arduino.
Now I’m connecting the usb a to b cable from the arduino to the computer and we’re
gonna go to the computer screen and I’m going to upload the code.
First you need to download a library to use the sensor, I have provided links to download
the library and the code in the description down below.
After downloading the library, open the code I have provided, inside the arduino ide go
to sketch, include library then add .zip and then select the zip file of the library.So
here in the code, the library is being used, there is a variable which mentions the pin
number we are using which is pin 7 and then here these lines of code will take the humidity
and temperature values from the sensor and display it on the serial monitor and here
this delay function will make the code refresh every 4000 milliseconds which is 4 seconds.So
now to upload the code, go to tools and then beside boards select arduino uno.
Then beside port select the com port where the arduino is connected.
Then hit upload.
After that to view the readings of the sensor, open the serial monitor which is this icon
right here.
Now in the serial monitor we can see the humidity and temperature values the sensor is reading,
it refreshes about every 4 seconds because of the delay function.
Now I’m going to blow air with my mouth towards the sensor and you will see the humidity
values increase, currently it is 59.
Now its around 64.
So that was it for this video, now you know how to integrate this sensor into your electronics
and robotics projects.
Thank you for watching, if you liked this video, please hit the like button and please
support me by subscribing and turn on notifications by hitting the bell icon to be notified for
future videos.
Again thank you very much for watching, see you in the next video!