Arduino Uno R4 WiFi LESSON 23: Control a Servo with a Potentiometer

Поділитися
Вставка
  • Опубліковано 5 жов 2024
  • Pick your Sunfounder kit up so you get the same results I do:
    amzn.to/3SciApZ
    You can pick up the neat jumper wires I showed in the video here:
    amzn.to/3U2vyIe
    You guys can help me out over at Patreon, and that will help me keep my gear updated, and help me keep this quality content coming:
    / paulmcwhorter
    In this video I show you how to control a servo using a potentiometer with the arduino. We learn how to load libraries, and control the position of the servo. Enjoy!
    [Disclosure of Material Connection: I am a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to amazon.com. ]
    #arduinor4wifi
    #servo
    #tutorial

КОМЕНТАРІ • 29

  • @qzorn4440
    @qzorn4440 2 місяці тому

    A very useful and relaxing Uno R4 servo video. Thank you Paul.

  • @larryplatzek9017
    @larryplatzek9017 3 місяці тому +2

    We have another tool to but in our box! Thank You Paul! Sorry you could not stay today!

    • @paulmcwhorter
      @paulmcwhorter  3 місяці тому

      Sorry I missed it. Was stuck in a remote location. Things should be back to normal last week.

  • @keithlohmeyer
    @keithlohmeyer 8 місяців тому +3

    Almost a half of years videos produced in a couple of weeks. Very impressive!

    • @paulmcwhorter
      @paulmcwhorter  8 місяців тому +8

      Keith, yes I have been busy. The challenge over here is things are very unpredictable and problems can pop up out of no where that you would never expect. Electricity, water, internet, food, security, safety, health are all common and sometimes very serious challenges I face. So, when things are clear, I try to get as much work done as possible, so if I get malaria and typhoid at the same time, I am not under pressure to get next weeks lesson out. I try to stay ahead. Pretty soon, I will need to switch back and get more pi pico videos made. What I have found is it is hard to keep switching back and forth between the two boards, so while I am in arduino mode, I want to get as many lessons done as possible.

  • @LorisHW
    @LorisHW 3 місяці тому +1

    I was successful with the HW. Finally caught up. Thanks for the lesson Paul.

  • @drthik1
    @drthik1 Місяць тому +1

    I folded up like a cheap Walmart lawnchair , completed lesson 22 hw but forgot to save the sketch on computer. Was trying to figure out a way to download it from the arduino and accidentally hit the upload button on an empty sketch lol

  • @chuckpar2206
    @chuckpar2206 3 місяці тому

    Like the slope of a line as Paul noted, however I simply used servoAngle=potVal/5.69 and appeared to get same outcome.

    • @paulmcwhorter
      @paulmcwhorter  3 місяці тому

      You really want to do it with math, the way I showed. Using ratios does not work when the y intercept is not zero.

    • @chuckpar2206
      @chuckpar2206 3 місяці тому

      @@paulmcwhorter thank you, will do.

  • @akselhansen7670
    @akselhansen7670 3 місяці тому +1

    Always fine lessons....But I did not understand why you have to put in that delay statement in order to get it work?

    • @keithlohmeyer
      @keithlohmeyer 3 місяці тому +1

      Paul mentions that the servo needs the delay but it is really the analog read of the pot that needs time to complete the A/D conversion. A delay of 1 ms is usually enough.

  • @ruellerz
    @ruellerz 14 днів тому

    @14:00 i learned about the map function. done :D

  • @patrickfox-roberts7528
    @patrickfox-roberts7528 3 місяці тому

    👍👍👍Naughty wiring it with power applied :D

  • @scottwait3585
    @scottwait3585 3 місяці тому +1

    Thanl you Paul!

  • @akselhansen7670
    @akselhansen7670 3 місяці тому +1

    Sorry you have ansvared about the delay, but it is a litle difficult to understand how hard you can control the servo....

  • @perfectly_unstable
    @perfectly_unstable Місяць тому

    @20:18 not how I did my math it seems more complex than needed, and that's going to make me uncomfy if I'm wrong. is there a reason I should not use servoAngle=(180./1023.)*potVal;?

  • @AshrayJK
    @AshrayJK 3 місяці тому +1

    Paul sir, i love ur vids. thx for ur kind help. do u hv any advice for ppl learning arduino at this young age(12 years old)?

    • @paulmcwhorter
      @paulmcwhorter  3 місяці тому +1

      My advise, keep taking the lessons, and then also think about taking the Raspberry Pi Pico W lessons as well. Keep up the hard work!

    • @AshrayJK
      @AshrayJK 3 місяці тому

      @@paulmcwhorter when i checked out the raspberry PI kit on amazon, it ahd all the component of my elegoo kit that i bought and i just need the board. will it be okay if i use the arduino kit and just buy the raspberry PI board or should i buy the raspberry PI kit?

  • @michaelcox1225
    @michaelcox1225 3 місяці тому +1

    I am leagend

  • @RicardoHernandez-nd5pp
    @RicardoHernandez-nd5pp 3 місяці тому

    Hola?

  • @robertschuldenfrei2402
    @robertschuldenfrei2402 3 місяці тому +1

    I got the video done before the class, but it is done without sound. ua-cam.com/video/hS9u-nxk0Y0/v-deo.html

  • @mikmaster63
    @mikmaster63 Місяць тому

    ua-cam.com/video/YW-T9pxj6ko/v-deo.htmlsi=Qtw4xL9mg3ELCgG_
    Not sure why it’s not working. It’s printing out both values. Tried changing polarity on potentiometer. Loaded previous lesson and servo is working. Thanks, love the videos

    • @paulmcwhorter
      @paulmcwhorter  Місяць тому +1

      Keep debugging. I cant really see from the video what is wrong. Print out the angle you are applying. Then simplify code. Find the error