Using an Arduino with Python LESSON 7: Measuring Temperature and Humidity With the DHT11

Поділитися
Вставка
  • Опубліковано 26 жов 2024

КОМЕНТАРІ • 72

  • @pylogik
    @pylogik 2 роки тому +3

    I gave myself a homework assignment that was too difficult. I had to fall behind in the lessons a bit but I'm ALMOST finished. I wanted to use the Raspberry Pi Pico for my voltometer, without buying extra pieces(use what I already have). I'll post progress on the homework at my own pace from here on out. Just a friendly update. Thanks again Paul.

  • @joestanco4341
    @joestanco4341 2 роки тому +4

    Great lesson. I did not have a DHT11 but had a DHT22 which worked fine with the statement #define DHTTYPE DHT22

  • @techquirks707
    @techquirks707 2 роки тому +2

    I did not know anything about programming or arduino. Then I watched a few of Paul’s videos. Two weeks later, I designed an interactive system for my car that tells me if I forgot to disable parking brake, vehicle speed, weather, etc

  • @magnumopus1415
    @magnumopus1415 2 роки тому

    Thanks paul for these vids, u inspired me and my friend, u ignited a fire for both of us

  • @alfredcalleja450
    @alfredcalleja450 Рік тому

    Thanks again: I feel quite bodacious - another very informative tutorial.

  • @xavierbraive4470
    @xavierbraive4470 2 роки тому

    Thank you Paul, great lesson ! 16°C / 60°F here in my house !

  • @daviddirac5942
    @daviddirac5942 2 роки тому

    Thank you for another clear lesson!

  • @kyuzyu4702
    @kyuzyu4702 2 роки тому +2

    cant wait for it!!

  • @erasmuseobeth6897
    @erasmuseobeth6897 2 роки тому

    Found 6 of your Arduino series from a friend in my department, watched them this week. I really enjoyed them and am planning to watch all of your UA-cam videos if i could source enough data Bandwidth for internet connection. and then share your videos like gospel through out my computer Engineering department. Oh! and your new name is thanks for making all your videos in advance.

  • @scottwait3585
    @scottwait3585 2 роки тому

    Thanks Paul. Great video!

  • @Sikuq
    @Sikuq 2 роки тому

    A little late this time but I enjoyed your lesson 7. Thanks.

  • @warrenscorner
    @warrenscorner 2 роки тому

    Hi Paul, I also like to keep my colors organized and the proper color. I purchased small spools of solid core wire which I cut to length and strip. I have been playing with the DHT11 on an ESP8266 board. My goal is to create a web server that I can see while we are on vacation. Have you ever used Platform IO in Visual Studio? Pretty cool stuff!
    On a side note. The safe is open! I needed to hire a safe technician to break into it. He drilled two holes in the door. The first one was to put a scope into the tumbler area. He found the tumblers weren't moving. The next hole was to cut the bar that prevented the handle from turning. It was very disappointing that he had to make those holes and now the safe is not usable. The holes can be plugged and the bar welded. The tumbler fell onto the floor when he opened the door. Two small screws that hold the entire thing in there fell out. The tumbler is fine. I just need to reinstall it. We did find a bunch of old coins inside. I'm not sure if they have any value yet. It's at least a couple hundred bucks face value. Some of them are from the the 1920's so I need to start researching coins. I still plan to produce a video when I have some free time. My wife had knee replacement surgery and that has been my main focus. It's very exhausting caring for another person. I also have a greater appreciation for everything she does around the house. Wow! I've digressed!

    • @paulmcwhorter
      @paulmcwhorter  2 роки тому

      'Safe Technician' . . . did not know there were such types of folks. One has to wonder if he does any moonlighting in the evening with his special skills. So it sounds like your mechanism to unlock the safe did not work because the safe tumblers were not spinning properly inside the safe when the dial was turned? Really interesting you found some coins. Most all pre-1964 US coins are silver so the simple melt value would be about $20 per Dollar face value. That is $200 face value would be worth about $4,000 in silver content. But of course there can be numistimatic value so you want to look each coin up individually. Very interesting story

  • @wayneswan3092
    @wayneswan3092 2 роки тому

    I'm pretty antsy to get into lessons on operating a pan/tilt on arduino from python. Given the knowledge I've gained so far, I've successfully created a program where I am able to adjust the pan/tilt by entering a position in the command line in python. Today, I'll try and set up trackbars to manually adjust the pan/tilt positions. If successful, I should be able to start implementing into object tracking. So far, I have yet to find a suitable UA-cam tutorial on how to operate a pan/tilt on arduino from python. Lots of demonstrations where people have done it, but no one showing how to do it. But I almost got it figured out with your teachings so far.

    • @keithlohmeyer
      @keithlohmeyer 2 роки тому

      Hi Wayne, Using what I learned from Paul I was able to get it working on my AI mobile platform. I started out keeping track of the pan/tilt servo positions on the Arduino and just sending up/dn/lt/rt over serial. Of course I limited the min and max values on the servos in the Arduino code. It worked good for moving manually but when I went to color tracking I found I needed to track position in Python and send angle values over serial. I still only move the servos a couple degrees per frame to get the object closer to center. You will also want a 'buffer zone' in the center of the screen where you don't move the servos and call it close enough. I settled on +/-60 pixels. Otherwise you will get oscillation because of the lag between camera frame and servo movement. Let me know if you have questions or get stuck.

  • @floridian080
    @floridian080 2 роки тому

    Paul, I found it easy to upload DHT-11 data to python since the arduino-to-python example you gave us at the beginning of this series made provision for 3 variables. And it seems fairly straightforward to apply the previous thermometer models and "Volotometer" to temp and humidity. Fitting 3 graphics on one screen in vPython seems a little tricky.
    Request for a future lesson: Please show us how to generate live graphs (from Arduino sensors) in python using matplotlib and funcanimation. Mike

    • @paulmcwhorter
      @paulmcwhorter  2 роки тому

      At one time I had a method for using matplotlib to plot live data from the com port. It required several add on libraries, so dont know if that all still works. Really frustrating that there is not a simple powerful live plotting library. I have found 'livegraph' to be a very useful free program for plotting live data from the com port.

  • @limegreentechnologies8803
    @limegreentechnologies8803 2 роки тому

    Oh no paul, sorry, i forgot to watch this live. Ill of course do it with the replay

  • @jacesullivan4563
    @jacesullivan4563 2 роки тому

    Yeah buddy! Thanks paul

  • @anantchandak9574
    @anantchandak9574 2 роки тому

    Thanks
    Just want an arduino
    Then i will be expert by all these all tuts

  • @S24W2
    @S24W2 Рік тому

    Thanks Paul, but bit confused, when we were doing tge stepper motor we just included the library with , but here we have to install a library and use "". Could you please explain this, thabk you?

  • @edSabio572
    @edSabio572 2 роки тому

    Thanks Paul! I am legend (lower Case) I was able to extract Arduino Data into Python but since I am not VPython alumni,
    I will have to wait to see your graphics solution. : (

  • @nileshpathak9443
    @nileshpathak9443 2 роки тому

    You are legend 😊

  • @jeanmahe8657
    @jeanmahe8657 2 роки тому

    great video

  • @pccustom403
    @pccustom403 2 роки тому

    i love in arduino

  • @ianneill9188
    @ianneill9188 2 роки тому +2

    Hi Paul. Another great lesson, and one that I really had a lot of fun with.
    I have posted my solution in 2 parts, Part A for the Arduino side of the things, and Part B for the Python side.
    Part A - ua-cam.com/video/dWHmZ2d8M5w/v-deo.html
    Part B - ua-cam.com/video/8y3apH-z4aY/v-deo.html
    My Arduino sketch has some "poor man" multitasking with "millis()" and the Python code is now functional and classy!

  • @tommymemed2651
    @tommymemed2651 2 роки тому

    Hey Paul, huge fan of your most of your series. Thanks for the great content. My Dht11 is giving me back nanDegrees? Tried to find some documentation online but cant seem to find a solution. Any help from you or the community would be much appreciated.

    • @paulmcwhorter
      @paulmcwhorter  2 роки тому

      NAN means Not a Number. Usually it comes from dividing by zero. It might be your device is not hooked up right, or it might have gotten damaged. Check everything, hardware and code very carefully.

    • @jordanc1860
      @jordanc1860 2 роки тому

      @@paulmcwhorter MAIKA TI SHEEBA

  • @wayneswan3092
    @wayneswan3092 2 роки тому

    The biggest head scratcher I'm running into here is "how do we know which side (python or arduino) to write which part of coding? The best I can figure, is to treat it light a switch and power circuit, where arduino is the power circuit, and python is the switch. Turn the light on in python, which activates the electrical circuit in arduino. Would this be accurate depiction of how to know where to write which part of code?

    • @paulmcwhorter
      @paulmcwhorter  2 роки тому

      In general I do as much as possible on the python side, since your desktop has much greater processing resources. On the arduino side, mainly get the data and pass to python.

  • @fransvanenschot3286
    @fransvanenschot3286 2 роки тому

    Hi Paul
    It has nothing todo with this lesson but i have a question about matplotlib.
    i have it installed on python 3.9.9 with vpython with the command pip install matplotlib
    but it doesn't work
    why it is not work, and with what command can i uninstall it again?
    Grtz Frans

    • @fransvanenschot3286
      @fransvanenschot3286 2 роки тому

      Hello Paul,
      problem solved. matplotlib works now perfect with python 3.9.9
      grtz Frans

  • @Nick-xz1qq
    @Nick-xz1qq 2 роки тому

    Thanks this was very nice to watch. What do you think about Russia vs Ukraine?

    • @paulmcwhorter
      @paulmcwhorter  2 роки тому +1

      I think US should mind its own business. Seems we are trying to provoke Russia into a war

  • @sunilkulkarni4426
    @sunilkulkarni4426 2 роки тому

    Paul, approx by which month the 3D printer and raspberry pi videos going to start ?

    • @paulmcwhorter
      @paulmcwhorter  2 роки тому +3

      The first Raspberry Pi lesson will drop on March 10. Will be in the normal time slot the AI class was in

  • @neilausten9404
    @neilausten9404 2 роки тому

    Can't yet work out how to separate three pieces of data coming into python, from the arduino.

    • @ianneill9188
      @ianneill9188 2 роки тому

      Look at the split method, specifying your separation character (probably a comma). In my code I used this:
      (pot1Value, tDHT11, hDHT11, tDHT22, hDHT22) = arduinoDataPacket.split(",")
      Note that I had 5 variables, and this code is not bulletproof - send insufficient data from the Arduino and Python will croak.

  • @fransvanenschot3286
    @fransvanenschot3286 2 роки тому

    Hoi Paul,
    i have made my homework. Made 3 meters from 270 degrees. What i saw was that it looks dat the text from both meters on the outside was more fat then the text in the middle from the screen. do you recognize this. The code for the text i use is exactly the same.
    grtz Frans

    • @keithlohmeyer
      @keithlohmeyer 2 роки тому +2

      Frans, It is probably parallax from the camera view. You can hold shift and left mouse to pan the image to see if that is the problem.

    • @fransvanenschot3286
      @fransvanenschot3286 2 роки тому +1

      @@keithlohmeyer
      Thanks Keith, that was the problem. When i move the camera, the other meters has that strange behavior.

    • @arlo4051
      @arlo4051 2 роки тому

      @@keithlohmeyer Thanks for that tip Keith, It was giving me fits also when I tried to zoom and would lose half the object with half the screen empty. I thought I was going to have to go through the whole program moving (pos).

  • @colepdx187
    @colepdx187 2 роки тому

    Instead of making the meter elaborate, I made a simple minimalist meter style and focused on creating a reusable 'meter' class. It easily creates a meter object and uses an 'update' method to turn the sensor data into an axis to update the meter needle.
    Here's my solution: ua-cam.com/video/unu6rTrGII0/v-deo.html

  • @trogdorandfriends
    @trogdorandfriends 2 роки тому +3

    My homework is at ua-cam.com/video/KlkkiivChXs/v-deo.html

  • @Octopus-93
    @Octopus-93 Рік тому

    This is my homework done!
    ua-cam.com/video/5XA1fKhKvZI/v-deo.html

  • @itsmeintorrespain2714
    @itsmeintorrespain2714 2 роки тому

    I've uploaded a video that's not quite the homework asked for but some may find it interesting. Excuse my wobbly Fritzing stuff though, I'm still learning. ua-cam.com/video/H_oMkmVQbjw/v-deo.html BTW this whole production was done on a Pi4 4gb.

  • @rorderuiter
    @rorderuiter 7 місяців тому

    This is my homework solution. ua-cam.com/video/10hLFAotGQg/v-deo.htmlsi=K3BeT1aBFlhvDa3j
    This is really very nice to make! Thank you the lesson Paul!

  • @berryblades
    @berryblades 11 місяців тому

    I am legend, Thank you for another great lesson Paul! I worked really hard on the homework for this one, please let me know what you think - ua-cam.com/video/UFUw0OuFdPA/v-deo.html

  • @marksullivan4033
    @marksullivan4033 2 роки тому +2

    Fun lesson. I adapted the code from the voltage meter lesson and make some tweaks. Creating the labels threw me off for a while as I started out creating them as text. only to discover I couldn't update 3d text. So switched to labels and it works as expected. However, I don't like that it always faces the camera and looks wrong once I've relocated the camera. Is there a better solution?
    Link to the video: ua-cam.com/video/FzvCCM4hptw/v-deo.html
    Link to the code: github.com/kramnavillus/Arduino-with-Python