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

  Рет қаралды 159,021

Paul McWhorter

Paul McWhorter

Күн бұрын

Пікірлер: 416
@dbhamilton9555
@dbhamilton9555 3 жыл бұрын
PS -- I'm 78, retired Chemistry instructor, and decided to learn electronic basics as a Covid relief. Never too old to learn new things. From one instruction to another, I find your presentations very well thought out. Thank you !
@aaronmilliman7685
@aaronmilliman7685 2 жыл бұрын
How is it coming along?
@muhammadrafiqulislamkhan6994
@muhammadrafiqulislamkhan6994 Жыл бұрын
I love your proverb never too old to learn new things and I would like to use it inspire other people who count ages though it seems to be a number. Thank you.
@socorrotravassos2397
@socorrotravassos2397 4 жыл бұрын
Paul, I am a 67 year old carpenter. I just recently got turned on to the exciting world of electronics, arduinos, robots and all the rest. I regret having missed all this earlier in my life. But I just wanted to tell you how much I appreciate your tutorials. They are excellent in every regard. Everything is top drawer. Your personal teaching style, the graphics, the sound and lighting, the topics covered and the pace all make me keep coming back for more. Well done man! Keep up the good work!
@chrisingram7277
@chrisingram7277 4 жыл бұрын
Hey Socorro, I'm also a carpenter, 60 years old. You should also try Paul's Fusion360 tutorials, it's about 3d printing, the software is free for personal use. I ended up buying a 3d printer last Christmas and it aligns perfectly with our skills. It's amazing how many replacement parts I've made. There are loads of jigs to be made too, shop vac adapters, etc.
@DaleDix
@DaleDix 4 жыл бұрын
Back then it was uni or apprenticeships. Tech school or high school. A whole new world now
@DeeGeeDeFi
@DeeGeeDeFi 4 жыл бұрын
I’m only 52, and I had a few Radio Shack electronic kits as an 11 year old. Radios, FR transmitters, lights and noises. This whole arduino/programming is amazing!
@robertwilkerson9723
@robertwilkerson9723 3 жыл бұрын
"Hey" brother right along with you do it at 72! Retired Carpenter/Project manager 50 years studied electronics in High School, to dumb for Math and C++ but enjoy following along and creating, making this stuff work keeps the mind active (not so much for the body).
@TMRu22311
@TMRu22311 3 жыл бұрын
This is so cool, I am a 51 year old Carpenter and just started learning electronics. It's really what I wanted to do in life, I even took electronics classes in high school, but college was not an option for me :( But now, with the internet and wonderful people like Paul, you only need time and the will to learn :) The Arduino seems to be a great place to start in learning electronics, but I also recommend eBooks.
@johnganci933
@johnganci933 4 жыл бұрын
Another great video! Two comments. 1. An alternate way to install the DHT11 library is to use the Arduino IDE. (I'm using version 1.8.10 of the IDE.) From Tools->Manage libraries... enter "dht" in the "Filter your search" box; after about 1 second, you will see some results (I see "DHT sensor library by Adafruit Version 1.3.8" as the second entry). If you put your mouse in the area for an entry, an Install button appears. Clicking it installs the library. Done! Note: the same version, 1.3.8, appears at the top of the list when doing the search you describe in the video. 2. At 17:00 you noticed that "readHumidity" did not highlight correctly. This is due to something not being right in the "keywords.txt" file that is in the DHT library folder. I found the following problem and fix that describes what is probably wrong: github.com/adafruit/DHT-sensor-library/commit/a1169d20b4f287810c9c237859a856bcbc0b6ea2 I suspect that if you use a hex editor to look at the readHumidity line in your keywords.txt file, you will see that there is not a tab (0x09) character between readHumidity and KEYWORD2. See the keywords.txt snippets below. Note: In my installed 1.3.8 keywords.txt file, tabs are where they should be. Entering readHumidity() (and readTemperature()) in a sketch produces highlights as expected. I just downloaded the "1.3.4" version of the DHT library (supposedly the same one you did when you created the video), unzipped it, and looked at the keywords.txt file line for "readHumidity". It does have 0x09 between readHumidity and KEYWORD2. However, when I look at the timestamp for the keywords.txt file, I see "30 April, 2019", which is after the release date of 2019-02-18, so this file may not be the one you were using! Looks like Adafruit slipped in changes after the release date. Here's a snippet of what I see in the 1.3.4 keywords.txt, both in ASCII and in hex. All instances of lowercase 'b' in the ASCII snippet represent (what appear to be) spaces. In the hex snippet, the "spaces" are seen to be tabs (0x09), as they should be. The hex output shows 16 bytes of output per line; the hexadecimal numbers are the byte values--4 groups of 4 bytes; the text at the end of each line is the corresponding ASCII; periods represent unprintable characters. The periods on the first line of the ASCII snippet skip over the beginning of the text line up to the point it matches the corresponding hex output. ***** begin ASCII snippet ***** ..............exbbbbbbbbKEYWORD2 readHumiditybbbbKEYWORD2 readbbbbKEYWORD2 ***** end ASCII snippet ***** ***** begin corresponding hex snippet ***** 6578094B 4559574F 5244320A 72656164 ex.KEYWORD2.read 48756D69 64697479 094B4559 574F5244 Humidity.KEYWORD 320A7265 6164094B 4559574F 5244320A 2.read.KEYWORD2. 0A . ***** end corresponding hex snippet ***** I'm guessing that you have a space (0x20) between Humidity and KEYWORD2. While I thoroughly enjoyed the video and working on the sketch for Lesson 50, I think I had more fun looking into the keyword issue!
@couteaghajarry6332
@couteaghajarry6332 3 жыл бұрын
For library installation you can just go to sketch>include libraries > add ZIP. Library without extracting the zip file . And by the way thanks for your tutorials Paul ;) keep up the great work.
@pieyield2255
@pieyield2255 Жыл бұрын
Thank you so much!
@jjedwards1
@jjedwards1 Жыл бұрын
This is the way
@simontopley4771
@simontopley4771 10 ай бұрын
Cheers fella.
@theteenengineer7589
@theteenengineer7589 4 жыл бұрын
the voice of Paul is music to my ears :)
@klrwhizkid
@klrwhizkid 4 жыл бұрын
I got it working first time. Then I changed the LCD to one with Serial input and using a sensor shield to tidy up things. Got it working; BOOM! I really appreciate your willingness to share. With a background in Electrical Engineering and Computer Science, I spent 32 1/2 years in the technical support and technical training area of Toyota Motor Company; most of it training Toyota dealership technicians. I can appreciate all the time and effort that you put into each of these activities. Great job and keep up the good work!
@devtest8259
@devtest8259 4 жыл бұрын
Paul, you are an educator and mentor. If I helped half as many people as you have I would be happy. Luckily I did have teachers like you in school. You make learning fun and interesting and I hope you never lose interest in teaching.
@chrisb7250
@chrisb7250 Жыл бұрын
When I saw that the Nano had bluetooth capability, I got really excited for the projects that lay ahead. Thank you for all you do Paul! these projects have really opened my eyes to some of the systems i have been using all my life... eg. the automatic door at the grocery store, the thermostat on the wall, fans... Almost every time I do a project, I can see it's application in the real world. This has been very enjoyable. I plan to keep doing the lessons!
@sorryboss8550
@sorryboss8550 11 ай бұрын
Yea, I have wasted so much money buying a Bluetooth module and a wide chassis for my projects, I thought the nano would be more like a rasb pi, boy was I wrong
@bn1651
@bn1651 4 жыл бұрын
Hey Paul! Loving the tutorials, i'm an arduino veteran but stepping back into it after years and this has been a great refresher. PLEASE make sure you update your link on the elegoo kit, it looks like they may have made a new product listing so none of us can support you by following the link. I'd suggest updating it on all your video descriptions so you can get the well deserved referral credit.
@chrisvandergriff504
@chrisvandergriff504 3 жыл бұрын
Paul, you have single-handedly revived my conviction to complete my project. You're a legend, sir.
@paulmcwhorter
@paulmcwhorter 3 жыл бұрын
Excellent!
@carlkoplinmd6776
@carlkoplinmd6776 3 ай бұрын
I have followed and enjoyed all of your videos in this series so far. I followed your explanation on installing the DHT library and I received an error message "file not found". After some research, I had to also download the ADAfruit_Unified_Sensor zip file as well. Now all is working.
@sssagc
@sssagc 3 жыл бұрын
Okay, I've done the homework for this lesson. My Arduino kit did not come with the DHT sensor and Nano and so both had to be ordered separately. The LCD came in the Arduino kit came with an I2C module embedded with it and that eliminated the extra wiring needed; however it needed for an extra library to be downloaded and installed. The Nano had some compatibility issues and after some research came to understand that some of these foreign manufactured items needed a separate driver to be downloaded and run. The DHT sensor too required an additional "Adafruit sensor master library" as well as the "DHT sensor library" installed. I coded the lcd to display "Humidity" and its value in the first screen and after 2 seconds the display clears and shows "Temperature" in the 1st line and the values in Celcius and Farenheit in the 2nd line. Enjoyed the challenge !!!
@randallsemrau7845
@randallsemrau7845 3 жыл бұрын
9:00 "I'm learning along with you" ??? That's real confidence inspiring Paul....
@alexm.4720
@alexm.4720 2 жыл бұрын
Hey Paul, thanks for the amazing lessons. I was able to do the assignment from lesson 49. It was easy. As for this lesson. when i tried uploading the code it gave me com error but after googling i was able to solve the problem. I had to delete the DHT Library folder and download it directly from the Arduino IDE and i also had to install the Adafruit Unified Sensor Library but after doing this everything worked perfectly. I am amazed how simple it is to use this sensor and displaying the readings to the LCD was a piece of cake. Thank you for these amazing lessons!
@jadondewey1237
@jadondewey1237 2 жыл бұрын
I tried that but my code is still putting out errors
@deadsquadmortal8448
@deadsquadmortal8448 2 жыл бұрын
yeah it wont work but if you delete that folder and then install it from the arduino itself it will work. I think its because it needs other libraries as well to work.
@josegayoso2452
@josegayoso2452 Жыл бұрын
Thanks Alex, I follow your recommendation and it worked.
@blackbox330
@blackbox330 Жыл бұрын
Sir, Great video. Just an update. I had got nan output. Trapped output in long variable. Got -2147483648 as output. Finally loaded Files>Examples >DHT sensor library. Uncommented DHT11. Commented DHT22. Compiled & loaded. Got correct output. Thanks for great videos. Your explanations are excellent. When ever possible, please tell us about arduino board. There are so many videos on internet, but your style is second best to none.
@ericsmith7988
@ericsmith7988 4 жыл бұрын
Had to go in and update from the libraries and install the DHT11 from Adruino program. I tried different ways to get it to work but finally got it. Also when I went and started coding all of the names " DHT11, DHT, humidity, readHumidity, and readTemperature all turned orange. It works great and had no problems down loading it. Thank you Paul for a great lesson.
@raymondsenyo4853
@raymondsenyo4853 4 жыл бұрын
Hello Mr. Macwhorter, am Raymond from Ghana-west Africa. I started learning Arduino Programming by watching your videos and when my desire and hunger for it increased, I went online to look for books on it and have actually finished learning one of the books. Your videos have been very inspirational and fundamental to my increasing taste for Arduino. I have watched all your videos on Arduino from start to finish just that, I don't watch it online, I download and practice so you may not see me responding to your "secret world" challenge. Due to my increasing desire to know more, I have come across some options that may be helpful; 1. You know, for the equations that you derive to help match some group of values with the other, there is a function in Arduino called "map()" and I do think it can be used inplace of the equations. 2. Secondly, for the buzzers, there is also a function called "Tone()" and also "noTone" that can be used to control the buzzer. So I am humbly suggesting this suggestions so it could be researched to see how helpful it could be in the making of subsequent videos. Mr. Macwhorter, keep up with the good work you are doing because, you are actually helping someone somewhere indirectly Usher into the world of programming and the technologies that come with it. I personally want to ask if you would start Arduino video tutorials on wireless devices. Thank you sir. Gmail: raymondsenyo92@gmail.com Contact: +233542924336
@adamcurtice3584
@adamcurtice3584 2 жыл бұрын
Got everything to work fairly quickly on this assignment. I discovered the sq() and PI functions which made the formula for the area much easier and more accurate. The rest was just utilizing what I learned in the last tutorials. Easy to learn when you have a great teacher. Thanks for the lessons. I also got the humidity and temperatures to display without any real issues. The biggest problem is fitting everything to the display.
@JohannBaritono
@JohannBaritono 3 жыл бұрын
I came here because my project wasn't working. I looked at the documentation and it's definitely wrong. From the pins on the sensor to the test scheme they provide. When I did it, it kept saying "can't read from DHT". I followed your tutorial and everything run smoothly. Thank you for such outstanding tutorials.
@JohannBaritono
@JohannBaritono 3 жыл бұрын
May I ask how you got to know the commands you had to use? I'm afraid I'll need that skill when using other sensors or different hardware. I feel really lucky that I had bought the Elegoo kit and coincidentally you use it for your tutorials. I think I won't be that lucky in the future ;)
@williamwachter3279
@williamwachter3279 Жыл бұрын
I can’t tell you how much I appreciate your walking through the actual process and the comments that provide further info to orient me!
@souvikmandal1919
@souvikmandal1919 3 жыл бұрын
Thank you for all your dedication and effort in your videos. I am currently not able to follow along these lecture on a daily basis (for some reasons). 😔 But your constant effort and beautiful teaching is leaving me mesmerized each time i see it and learn something new. Good day , Sir and I hope with all my heart that you are doing well during these pandemic times.
@frang342
@frang342 Жыл бұрын
Hi Paul, I've started from lession 1 and now I'm on lession 50. I've learned a lot along the way, especially on coding. You are very easy to follow as a beginner. I plan on finishing these lessons and then jumping over to the raspberry pi pico w. Thanks for taking the time to do what you do. You always wonder if people watch the whole video and do your homework. Well I do watch all the way through and do the homework,however I wonder if you go back and read these comments on these lessons that you posted 3years ago. Today is 10/13/23.
@sailingskismo
@sailingskismo 2 жыл бұрын
OMG! I've made it so each time you press the toggle switch the display cycles through Humidity, temp in C or temp in F, display! I'm so pleased with my ageing brain :) Oh, and the library recognition was an absolute sphere-ache, seems a lot has been updated in the last 12 months.
@John-Wilkins
@John-Wilkins 9 ай бұрын
THIS IS AWESOME. I started learning C++ and just wanted to do something other than web development. I'm so excited about how you have made this subject accessible for anyone to understand. I'm so excited to start working on IoT things.
@Японскийшагзашагом
@Японскийшагзашагом 10 ай бұрын
Assignment is completed! Did it with the recommended wires and bigger breadboard, and it feels and works so much better! Waiting for my Arduino nano! Thank you very much for your amazing tutorials!
@nachoKrinkle
@nachoKrinkle 4 жыл бұрын
My 9yr old daughter and I walked through this and had a great time watching you. Thanks! I like graphing out the temps.
@DrDave327
@DrDave327 2 жыл бұрын
Hey, Paul! I just built a project using my Arduino and the DHT11 to switch on my garden well pump to sprinkle my fig trees to prevent them from freezing in order to extend the growing season of the trees. I used the 5v relay in the kit to drive another relay that handles the high current load.
@paulmcwhorter
@paulmcwhorter 2 жыл бұрын
Excellent!
@robertschuldenfrei2402
@robertschuldenfrei2402 10 ай бұрын
Great lesson, as usual. After this tutorial was made it became NECESSARY to include . All the recent comments report this. I have a highly accurate chemical thermometer. It seems my DHT11 is reading 3°F high. So, I display dTemp which is tempF-3.0.
@MarvPerk3
@MarvPerk3 3 жыл бұрын
My problem of 20 minutes or so below... RESOLVED! Paul, at a suggestion found on the internet, I plugged the Arduino into a USB port on a powered Hub and it WORKED! I guess the power from the "on board" USB port on my PC didn't have enough juice. Now I can go on with the lesson!
@gustavoapasquel9715
@gustavoapasquel9715 Жыл бұрын
Still had my lcd screen so instead of printing to the monitor i printed the sensor results to the lcd works awesome thanks for your videos they are great.
@opalprestonshirley1700
@opalprestonshirley1700 4 жыл бұрын
Great lesson. My out put was so scrambled it was driving me crazy until I saw it was plugged into pin one but everything going well now. Thanks Paul.
@MeghanMaulfair
@MeghanMaulfair 7 ай бұрын
Hey Paul! I just wanted to say your videos are truly amazing. You actually explain how these things work. Thanks for all your time and effort you put in them.
@paulmcwhorter
@paulmcwhorter 7 ай бұрын
Wow, thanks for the kind words. Hope you continue to enjoy them.
@chuckpickering6040
@chuckpickering6040 4 жыл бұрын
The Arduino IDE will also add/install a zipped library automatically for you via the sketch/include library/Add .zip Library...
@johndoudar6395
@johndoudar6395 4 жыл бұрын
Or you can use the library manager.
@dougnash6316
@dougnash6316 4 жыл бұрын
Thanks for that comment. It helped.
@dougnash6316
@dougnash6316 4 жыл бұрын
@@johndoudar6395 Thanks for that.
@dougnash6316
@dougnash6316 4 жыл бұрын
Thanks Chuck
@G8YTC
@G8YTC 4 жыл бұрын
Elegoo haven't used the normal pin layout on the PCB for the 11. The middle pin on most DHT11 units is data. Just in case someone isn't using the Elegoo kit. Thanks for the tutorials.
@chrisingram7277
@chrisingram7277 4 жыл бұрын
Thanks for the heads up, I almost connected the DHT11 as per a datasheet from the internet and remembered your comment. Any idea if I would have released the smoke by reversing the Vcc and data pins?
@legendarycraft5499
@legendarycraft5499 4 жыл бұрын
@@chrisingram7277 probably just fry the sensor... as I did probably... (a new one is on the way) =))
@DaleDix
@DaleDix 4 жыл бұрын
@@legendarycraft5499 Not too hard to fry sensors lol. I always check about ten sites before I plug some stuff in.
@APolles
@APolles 2 жыл бұрын
For anyone who struggles with compilation errors while compiling: Try only downlaoding the library via the bib manager under sketch and include the necessary adafruit software in the process. Otherwise, great video as always!
@jaydenodom3844
@jaydenodom3844 Жыл бұрын
thank you!
@gjd54321
@gjd54321 4 жыл бұрын
There are three ways to install a library. Paul explained the manual way.A semi automatic way would be to download the Zip file, go to Sketch and click on Add Zipfile. The easiest way is however to go to Sketch, choose Library Manager and search for DTH11, click on install. Knowing this two days ago would have saved me lots of time...
@jayakrishnanv2399
@jayakrishnanv2399 4 жыл бұрын
kzbin.info/www/bejne/nHOZnZWjqpKgoZI
@MJCPeters
@MJCPeters 4 жыл бұрын
Thanks to all in the community that responded to the error loading the library. Saved me hours of head scratching.
@mosft
@mosft 4 жыл бұрын
i am Engineer , before you i am zero in Ardunio now I give my self 8/10 thank you and don't Stop........
@frankowalker4662
@frankowalker4662 3 жыл бұрын
There is a lot I need to learn. At the moment I'm just cherry picking to get my bearings. All the rambling helps, I've been doing it since I was pre-teen, I'm now in my 50's. :)
@davidtomasgaitanrodriguez1356
@davidtomasgaitanrodriguez1356 4 жыл бұрын
Just ordered a few nanos, jumper wires and more more breadboards! Let's goooooo!!
@thomasmaxwell4396
@thomasmaxwell4396 2 жыл бұрын
Hi Paul - LOVED the lesson and the Homework! Goes great with a planned Weather Station build I want to make when I feel I've learned enough.
@sritamroy4430
@sritamroy4430 4 жыл бұрын
Excellent ! Very easy to learn from a Teacher like YOU. Waiting for Fingerprint Sensor(R307) and Bluetooth module(HC05) together programming and more surprise. Thank you SIR .
@trevorjanes1181
@trevorjanes1181 3 жыл бұрын
I installed the DHT sensor library by downloading the zip file, and then in the Arduino IDE menu, I selected Sketch > Include Library > Add .ZIP file. It was a bit simpler than Paul's method. And to answer Paul's question about #include "DHT.h" vs #include , they will both work fine. The difference is where the code compiler looks first to find the .h file, in the libraries folder or in the user's own code folder. If it doesn't find the .h file in the first folder, it will look in the other one.
@anilkhandelwal01
@anilkhandelwal01 4 жыл бұрын
i am 12 years all your projects worked
@mazarronmacum9386
@mazarronmacum9386 4 жыл бұрын
Had problems with the recommended library and running on a Mega 2560, loaded a library from different source and works fine (but slightly different output format) Most excellent!
@tonyperry6702
@tonyperry6702 4 жыл бұрын
i too experienced some issues with loading the library but in the end it worked. great video.
@invertedisosceles2715
@invertedisosceles2715 4 жыл бұрын
Paul, my guy.... Do you know how much I struggled with the libraries trying to do just this exact thing. One of those whose stuff helped was yours. And gladly I can say the project and many others relating to it were successes. Much obliged for your incredible work.
@matthewcollins1858
@matthewcollins1858 Жыл бұрын
Present. I really do appreciate all of the work and explanations you do. I feel like I've grown allot watching your videos.
@paulmcwhorter
@paulmcwhorter Жыл бұрын
Great to hear!
@hughpatterson1480
@hughpatterson1480 2 жыл бұрын
Hi Paul, I had to delete and reinstall the Library for the DHT11. Otherwise I got an error message regarding the Arduino Board. However, it was a good experience because things often fail and require thinking outside of the box to correct. I learned a great deal by doing so! Great lesson as always and I will pass it to my students!
@wayneandrews1738
@wayneandrews1738 Жыл бұрын
Homework Done! Here's the LCD output: Humidity: 51.00% (first row) Temp: 73.94F (Second row) I will try to use the character map to print the degree symbol that looks like a small circle. But this is fine. Wayne
@arlo4051
@arlo4051 3 жыл бұрын
Another great lesson, missed the "Most Excellent" explanation on how the DHT11 works "under the hood" , between winter and this Covid thing you're keeping me sane (mostly anyway), Thank You.
@cesaramaral7007
@cesaramaral7007 4 жыл бұрын
Thank you for walking us through instead of just opening a library example. Now I understand how to use and code for the sensor, instead of copying it. :D
@kiljupiter596
@kiljupiter596 2 жыл бұрын
YOU NEVER DISAPPOINT. THANKS FOR THE HELP
@Lisas4us
@Lisas4us 4 жыл бұрын
Dear Paul, I really appreciate your lessons. I am improving fast. I bought your kit and try some other little projects. Actually I am in marketing and communication, and I often have a tainted view from this perspective. I was thinking, if you make a second level class in a bit different way, I think you would get many more viewers,. The objective would be to develop a steady hartware tool to enable the student to use it in own projects and grow on it. My idea is, to start with an interface that we keep throughout the entire class, F.e. lets start with an bigger arduino. Than connect and program basic components, create chapters inside the ide. 1. Serial port. 2. Display and some Leds and switch 3. Real Time clock, 4. Memory Card, 5. esp2866 6, Blynk. - This components accompany us, hartwired to the arduino, throughout the entire class. We build sensors, projects actuators on this achitecture. At the end we can grow complex and more usefull things with arduino instead always starting from scratch, at the end just having one little part in a lowest level possible working. What do you think, Paul?
@bilbo593
@bilbo593 5 ай бұрын
Hi Paul , I now have it all working, I updated ide 1.8.9 to ide 1.8.18 and now it all works. I had alot of problems getting the nano card to work but the update fixed that as well.
@larryfostano6626
@larryfostano6626 4 жыл бұрын
Had fun with this project, tried to do it on an ESP8266 Node MCU V3. Got the code to install with a few minor changes, serial monitor is showing the print lines as expected but no readings other than humidity 0.00 and some temp reading I have to fix with the print lines. I used A0 for the sense pin and declared it in the sketch as an int .Temp reads nanC and nanF
@michaelpatterson1096
@michaelpatterson1096 2 жыл бұрын
Another great video. If you create any beyond #68, perhaps include how you figured out that we need to add these commands. #define Type DHT11 /*declaring a constant*/ DHT HT(sensePin, Type); // as most of us need to understand how you figure that out as well. My guess is that it is in the CD that was sent with the kit. Regardless, great job. Love the videos. We appreciate your hard work.
@steveholt8991
@steveholt8991 3 ай бұрын
Homework done ok. 😀 Funny story. I'm using the Sunfounder Elite Explorer kit for Paul's series on the R4 Wifi. I'm ok with programming but a beginner in electronics. When it came to the LCD the one I have has a piece of electronics on the back that prevented me from plugging the LCD in to the breadboard. Should I pull it off then maybe I can plug the rest in?. Fortunately, I did some research instead and found it was an I2C module. What is I2C? So I did some more research and found how to use it and found some libraries to drive it. It works fine and is a lot better than connecting all those wires to the Arduino. So Paul, not only am I learning from you, I'm learning by doing my own research and trying things for myself. Great lectures and I can't wait for the R4 Wifi series to advance.
@davebroster5560
@davebroster5560 2 жыл бұрын
Had big issues getting this library installed, until I found a much simpler way. As long as you're connected to the internet, do this: From the Tools menu in Arduino, select 'Manage Libraries' In the search box, type DHT, it will search download sites for you When the results appear, choose the Adafruit DHT Sensor Library and select Install It will probably warn you that there are dependencies and other libraries are required. Arduino will download the dependencies for you and install everything. That's it, worked perfectly, without even leaving Arduino.
@takiskard2414
@takiskard2414 3 жыл бұрын
Project did not work at first. Googled it. Said via 'Tools', 'Manage Libraries...' find and install 'Adafruit_Unified_Sensor'. Once this was done, project worked like a dream. Thank you. My question is: What is the point of the 'int setTime=500' line? It was not used anywhere. Should this have been used for the delay instead of then defining a new variable 'int dt=1000'? Thanks for an excellent set of tutorials. I got the Arduino on 25/12/2020 and I got to tutorial 50 by the 15/01/2021.
@Sharft6
@Sharft6 3 жыл бұрын
You also need the Adafruit Unified Sensor library found in Arduino library manager.
@wallaceshackleton1889
@wallaceshackleton1889 4 жыл бұрын
Did I mention that I manage to melt the DHT11? Serves me right for getting distracted by a troublesome piece of code on a previous play. Si I had lots of fun with the more accurate AM2302 sensor. However I did learn so much more on this lesson than all the previous cut and paste jobs with other peoples codes. I'd like to know, why the "true" against F? The Celcius measurement works without any mention of TempF.
@alexlannan5714
@alexlannan5714 3 жыл бұрын
This lesson was really exciting for me, I am building a little hydroponic green house to grow vegetables and I stretched the use cable right out at the end of the lesson to measure the humidity inside. Great lesson and great series, Thank you!
@wayneandrews1738
@wayneandrews1738 Жыл бұрын
Paul, I use the Tools -> Library Manager and type in DHT11 in the Search box. The Manager will put the folder in libraries folder. I installed the MCP4725 library for the DAC chip from adafruit.
@wallymurray620
@wallymurray620 4 жыл бұрын
Homework finished. Hooked up to a Nano and my LCD is displaying Humidity on row one and Temp toggling between C & F on row 2 every second a half. 😃. Plus hooked up to a battery and fully mobile. Now on to lesson 51 and see how my work compares to yours.
@Jim-mn7yq
@Jim-mn7yq 4 жыл бұрын
Another fun project, especially using the LCD to display the results. I followed the instructions regarding the library and initially had a problem (as some others also did). I then discovered that there is a library manager (as others also have) now built into the arduino development environment. It turns out there were dependencies that the DHT library required that needed to be installed. The nice thing about the manager is, it recognized the need for these dependencies andl went out and load the dependencies for you, making the process super simple. Once that's done, I used use the #include brackets and key words were then highlighted. Once all that was taken care of, the actual coding was straight forward and I'm very satisfied with the results. Another great vid, Paul, and I've ordered the nano for lesson 51.
@krisdevoecht
@krisdevoecht 4 жыл бұрын
Thanks Paul, I have coded my arduino by myself so it can controle my solarboiler....thanks to you!
@ricardosanchez1638
@ricardosanchez1638 4 жыл бұрын
I had a difficult time loading the library. It started by me not initially installing the Arduino program correctly in the first place. So I have to reload the entire program again, and this time in the Document folder, not the download folder. Since I am using a MAC, Arduino did not know where to find the folder for the DHT unit. It took real hair pulling, but really need to read the fault screens in great detail. I am really surprised that the Arduino has lots of interface communications for goofs like me. But it took me right to the problem by stating where it looks for the files which in my case is deeper than the library. You have to put it in the Arduino, library,Bare minimum folder, then install the DHT files there. Other than that, I really enjoyed the Tutorial. Thank you very much Paul
@leebasham1107
@leebasham1107 16 күн бұрын
Hi Paul, I was watching this video and i paused it at the print statement point(20:00) I decide to combine the DHT11 with my Nano based LCD circuit, I first swapped out the contrast pot with a fixed esistor (850R) and then changed the Serial.prints to lcd.prints. I had to drop the temperature in F, but then in the UK thats not much of an issue, i guess i need to figure out how to scroll text. My one reads every 5 seconds. it also runs from the 9V batter using the battery and PSU in the kit. BTW i have a few Nano boards, they all look identical but from different ouces and some require old bootloader to compile and other s use the new one, just in case any one has trouble with their Nano codes loading. Having soooo much fun, like being a kid again. Back to to video for homework.
@trevorjanes1181
@trevorjanes1181 3 жыл бұрын
At 10:35 Paul says that you have to use Arduino digital pin 2 to connect to the sensor left pin. I used a different pin and it worked fine.
@petercorbett1610
@petercorbett1610 4 жыл бұрын
In order to get the Arduino to accept the DHT11 Sensor via the library I had to add the 'Adafruit Unified Sensor' library." as well as the Library shown by Paul.
@VasilKurdov
@VasilKurdov 2 жыл бұрын
Haha, I was expecting the homework, so therefore I didnt detach the LCD from previous Tutorial and interestingly enough I started programming with that exact idea in my head much before I reach the end of the episode, so in the end I was ready with my homework, even before you mentioned it :)
@paulmcwhorter
@paulmcwhorter 2 жыл бұрын
Nice work!
@zennithaplatform4963
@zennithaplatform4963 4 жыл бұрын
Thank you Paul I am at lesson 31 now trying to catch up! Really enjoy the Elegoo kit so far.
@goldpsp
@goldpsp 4 жыл бұрын
I know this is outside of the normal format but I'd love to see you do a tutorial on arduino LCD touch screens one day! Love the series and the iced coffee Paul!
@matthewcollins1858
@matthewcollins1858 Жыл бұрын
Oh, and unfortunately, I'll have to wait to get the nano for a bit, but I did order the bigger board and the wire connecters. I do plan on getting it and any of the products you endorse, and if I ever need more, I intend to utilize the links that you provided.
@jamesgoacher1606
@jamesgoacher1606 4 жыл бұрын
This has been particularly interesting to me because my major reason for getting interested was to built a Freezer monitor after I accidentally unplugged one of mine. Eventually I will want to have (four) of them communicating to something by WiFi but this is an essential first step, for that project. I have used PICs in the past and used Assembly Language for them but I found Python confusing but 'C' I have been using for 40 odd years in various guises and I am comfortable with this interface. I am still accumulating items. BTW - giving advice of what to get with links is essential. I am following another author who does not and sometime I have to skip back and forth over the Video to catch what he has said and sometimes am not successfull. Thank you.
@robertnelson1802
@robertnelson1802 3 жыл бұрын
Thanks Ylen had the same issue. Thanks again Paul loving the course - this is a better fix than ice cold coffee :-)
@davidrender4028
@davidrender4028 2 жыл бұрын
Thanks again Paul. Truly enjoying. Great community idea
@devtest8259
@devtest8259 4 жыл бұрын
I love the nano. Eat them like snacks. Order them by the dozen lol. Whats noce is I can build all these examples and just keep them and not have to reuse the items due to the nano price point. Takes extra breadboards but very worth it for my own library. I also make my own jumpers from copper wire to avoid the wire mess. You have great advice in a very approachable style.
@carbon273
@carbon273 3 жыл бұрын
I finally was able to detach from the computer!!!! I used a pro mini instead of a nano. And all I had to do was connect it to an outlet.
@bigbear333uk1
@bigbear333uk1 4 жыл бұрын
Hi Paul here in England we call this symbol # a hash key and not pound just thought i would say. Still great lessons though you make them so interesting.
@edpreston2104
@edpreston2104 2 жыл бұрын
I was looking forward to seeing how you included libraries, so this tutorial answered most of my questions. The main remaining one is this: how you get a list of commands that are available in the downloaded library? You illustrated how to use some of them, but is there a location that has a complete list for the selected library?
@popege9186
@popege9186 3 жыл бұрын
Sir I followed you cuz your videos are really more easier attach to..... great stuff
@er.kakshshah2868
@er.kakshshah2868 4 жыл бұрын
Thankyou very much i am looking for this tutorial from beginning of this series. I request to make a complete tutorial on SPI and I2C interface communication later in this series.
@erygion
@erygion 3 жыл бұрын
Great video Mr. McWhorter : ) it worked perfectly for me and I always do the homework. Thank you for the lessons even for experienced folks its a good brush up.
@coltanjoyce6109
@coltanjoyce6109 3 жыл бұрын
Thank you for the information you have provided and for being so helpful and understanding on every peace of information when needed really appreciate it .
@okieinexile
@okieinexile 3 жыл бұрын
I like that you are using good coding habits.
@alanford7933
@alanford7933 3 жыл бұрын
I also had problems installing the DHT library. However I used the Library Manager from arduino and scrolled down to DHT library. I then installed from there and it came back saying that I was missing important files. I clicked yes to this and all was ok. Just one comment to Paul........ in England £ is pound. # is hash. Love the lessons though.
@stelios2000chania
@stelios2000chania 4 жыл бұрын
Thanks for another great video Mr Paul..... Is it possible to make a video of how to read from libraries the commands and how to use them , cause every library has its own commands and there are thousands of libraries out there. Thanks again.
@hemitpatel4758
@hemitpatel4758 3 жыл бұрын
An easier way to install libraries is to go to Sketch > Include Library > Manage Library and search up the library you want to install
@lesliethatcher9125
@lesliethatcher9125 3 жыл бұрын
I had the same problem and loaded the new library thanks for the info guy's
@MarcReeveNewson
@MarcReeveNewson 3 жыл бұрын
DHT.h needed Adafruit_Sensor.h to work. I can see at 8:06 that you have that library installed already. So I found that library and grabbed it too.
@MarcReeveNewson
@MarcReeveNewson 3 жыл бұрын
Homework went fine. Just stitching together code from the last 2 lessons. I did have some weirdness but figured out I was causing it because I had lcd.println in my code.
@jittlim4422
@jittlim4422 3 жыл бұрын
Thks Paul, great lesson during this "LockDown" in my country. Need to download and installed the full Adafruit Sensor Library to get the Arduino and DHT11 to work properly. :)
@paulmcwhorter
@paulmcwhorter 3 жыл бұрын
Have fun!
@christopherjames4422
@christopherjames4422 2 жыл бұрын
"I'm going to take another shot of this this is crazy"
@JimThompson-o6n
@JimThompson-o6n 9 ай бұрын
Nm Paul, I read other options and it’s working. Thank you guys. 😊
@remotaurog
@remotaurog Жыл бұрын
Great I got it working ,thanks for helping us out another one ticked .
@vishnuvaradhan1468
@vishnuvaradhan1468 Жыл бұрын
For the DHT11 sensor if u have 4 pins try connecting the left pin to VCC ,the next pin to DIGITAL PIN 2 and right most pin to GND.
@TheRealGloo
@TheRealGloo Ай бұрын
ignore the hate paul you are carrying my Electronics engineering career thank you for what you do for free
@MrBrotherchris65
@MrBrotherchris65 4 жыл бұрын
I also had to add the Adafruit_sensor.h library. I went a little further and connect the sensor to my LCD. Next is to connect I2C 20X4 LCD and add comments based on temp/humidity. Comfortable, Tolerable, ...you get what I mean. It was 104 yesterday at my home here in Texas.
@CrimFerret
@CrimFerret 4 жыл бұрын
Another option is to hop on Amazon and search for 7 in 1 RAB Holder. There are a number of them and they will hold an Arduino and one or more breadboards in place so neither will move in relation to the other. This makes it a lot easier to manage since you can wire jumpers to the breadboard from the arduino and have them available at any time without having to re-wire. Once I get to the point of actually making things I want to use, I'll definitely be picking up some Nanos. In 4 packs they are like $3.50 each if you look. It's actually cheaper (and neater for wiring) than buying Atmega 328's and the components needed to turn on into an Arduino
Arduino Tutorial 48: Connecting and Using an LCD Display
50:43
Paul McWhorter
Рет қаралды 180 М.
Don't look down on anyone#devil  #lilith  #funny  #shorts
00:12
Devil Lilith
Рет қаралды 42 МЛН
إخفاء الطعام سرًا تحت الطاولة للتناول لاحقًا 😏🍽️
00:28
حرف إبداعية للمنزل في 5 دقائق
Рет қаралды 58 МЛН
Get Started in Electronics #9 - Using the DHT11 Humidity & Temp Sensor
15:33
Arduino Tutorial 37: Understanding How to Control DC Motors in Projects
31:25
Measuring Temperature with Arduino - 5 Sensors
29:55
DroneBot Workshop
Рет қаралды 143 М.
Arduino MASTERCLASS | Full Programming Workshop in 90 Minutes!
1:25:31
Programming Electronics Academy
Рет қаралды 2,6 МЛН
How to Use Arduino Interrupts The Easy Way
33:28
Rachel De Barros
Рет қаралды 86 М.
How to Set Up the DHT11 Humidity and Temperature Sensor on an Arduino
7:50
Sending Temperature and Humidity Data to MySQL Server(PHPMYADMIN) using Arduino
28:32
Embedotronics Technologies
Рет қаралды 211 М.