Get Started in Electronics #7 - Controlling Servos with Uno & Code

แชร์
ฝัง
  • เผยแพร่เมื่อ 7 มิ.ย. 2020
  • Hello, 3D Printing & Electronics friends! Today we're going to find out how to control servos with an Arduino Uno, writing code in the Arduino IDE! This turned out to be astonishingly simple!
    In this series, we're using the Elegoo Uno Super Starter Kit. Want to buy an Elegoo Uno Super Starter Kit for yourself? You can pick one up here:
    • amzn.to/2B92t4i 🇺🇲US [affiliate link]
    • amzn.to/2IR2n5n 🇨🇦Canada [affiliate link]
    LINKS:
    BV3D Arduino Prototyping Base
    • www.thingiverse.com/thing:393...
    Did this video help you out, save you a bunch of time, or help you learn something new?
    If so, please consider becoming a channel member, or buying me a coffee, or leaving a tip! Your support really helps, and is VERY MUCH APPRECIATED!
    ✅ BV3D Channel Membership: th-cam.com/users/bv3dchanneljoin
    ☕️ Buy Me a Coffee: www.buymeacoffee.com/5lKshEVvL
    👍🏻 PayPal tip jar: www.paypal.me/bv3d
    *️⃣ The BV3D Channel Storefront on Amazon:
    • www.amazon.com/shop/bv3dbryan...
    *️⃣ Popular 3D printer affiliate links:
    • BIQU: shrsl.com/3s4hr
    • Creality: shrsl.com/3qu2u
    • Comgrow: bit.ly/33xcDtB [Check out the Creality REFURBS!]
    • Elegoo: shrsl.com/3pu98
    • FLSun: flsun3d.com/?ref=ifo73zup-gb
    • Pergear: bit.ly/BV3Dpergear
    • Sovol: bit.ly/3h90d2L
    • Sunlu: bit.ly/3hGNzpQ
    • Voxelab: bit.ly/3vVG9Wq
    *️⃣ In the market for a magnetic flexible build system for your 3D printer?
    💥Wham Bam Systems flex plates: bit.ly/2YzogLZ
    As a Wham Bam Systems Associate I earn from qualifying purchases.
    *️⃣ Shop for just about anything:
    🛒🇺🇲US: amzn.to/2x4hBxS [affiliate link]
    🛒🇨🇦Canada: amzn.to/2Ycb5ju [affiliate link]
    As an Amazon Associate I earn from qualifying purchases.
    SOCIAL MEDIA
    Follow me on Twitter (@bryan_vines): / bryan_vines
    Disclosure:
    I sometimes receive compensation such as discounted or free products, and when applicable, this is disclosed in videos and their descriptions. Whether free, discounted, or paid full price, any reviewed product is tested to the best of my ability, and I give my honest impression. All opinions expressed are my own.
    #Electronics
    #Arduino
    #Servo
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 68

  • @JeffSararas
    @JeffSararas 3 ปีที่แล้ว +9

    One reason your videos are so great is that you know exactly how much detail to #include.

  • @camshifft9937
    @camshifft9937 4 ปีที่แล้ว +22

    I really like how you make the lessons more interesting and easier to understand

  • @Boothby171
    @Boothby171 3 ปีที่แล้ว +1

    My son and I have started meeting once or twice a week, on your channel, to go over each subsequent lesson. He's in NOLA, I'm in NYS. We toss each other a few added challenges each lesson. For this lesson, we added a FOR loop for positioning, with a buzzer and LED from the previous lesson to briefly indicate the end of travel.
    Thank you!

  • @dogfightdiary5712
    @dogfightdiary5712 ปีที่แล้ว +2

    You make the kind of videos I need; explained in a way I can follow. Thank you!

  • @apfi3341
    @apfi3341 4 ปีที่แล้ว +19

    Finnaly you are continuing with your series. I´ve been waiting for it since i got my hands on one of those kits and i think your way of explaining it is much bette than the tutorial the elegoo uno gives in the instructions.
    Keep up the great work and humor ;)
    Pleas continue this series because its the only real series on the strater kit on youtube thats any good.

    • @BV3D
      @BV3D  4 ปีที่แล้ว +8

      Hi! I'm glad you like them! I try to have them out once per month, but I think it's been a month and a half since Episode 6 in the series. We're about halfway through the lessons in the instructions. Sometimes I combine two of the lessons into a single episode. The next one covers the ultrasonic sensor module. Thanks for watching! 👍

  • @spikekent
    @spikekent 4 ปีที่แล้ว +15

    Great video as always Bryan. You servo us very well, I can't help wondering if Uno that already.

    • @BV3D
      @BV3D  4 ปีที่แล้ว +6

      Thanks, Spike! And this microcontroller board we're using...It's not just my 'duino...it's not just your 'duino. It's ARduino! 😄

    • @spikekent
      @spikekent 4 ปีที่แล้ว +3

      @@BV3D Genius mate. I bow to your wordy magnificence.

  • @AndrewFulo
    @AndrewFulo 3 ปีที่แล้ว

    What I really appreciate in this recent videos are the application ideas of the lessons. These have been so helpful

  • @johnrelins4282
    @johnrelins4282 8 หลายเดือนก่อน

    I am loving the videos they are helping me so much.

  • @himbary
    @himbary 3 ปีที่แล้ว +1

    Happy new year! I would love to see more electronics videos from you

  • @Eliminoid
    @Eliminoid 3 ปีที่แล้ว +1

    I love these videos. I’m learning so much from them.
    Please keep making these

  • @Justice7227
    @Justice7227 10 หลายเดือนก่อน

    I love ur vids and your always so detailed and helpful with my path to making all sorts of stuff. Hope you continue to make more videos like these.

  • @dancellmovies
    @dancellmovies 4 ปีที่แล้ว +1

    Thanks for making these, I am working thru this kit and am only a few lessons ahead at the moment. I love your presentation and delivery of the information. I always endeavor to learn what I can DO with the knowledge I pick up and this channel and these guides are a wonderful way to help a beginner think outside the box beyond the PDFs. I will keep these affiliate links in mind as well to help support. As a dad I also appreciate the puns, while I am sure you get your share of cringes and eye-rolls. You have fun presence and a thorough. Thanks again for all of it.

    • @BV3D
      @BV3D  4 ปีที่แล้ว +1

      Hi Dan! Thanks so much for the kind words. I'm glad you like these videos, and I'm also glad you like the occasional dad joke. This episode was somewhat lacking in the pun department, sadly. 😃

    • @dancellmovies
      @dancellmovies 4 ปีที่แล้ว +2

      @@BV3D I am Shure you'll find a way to Serv-o good one!

  • @wtfshikyo
    @wtfshikyo ปีที่แล้ว +1

    These videos have been great, thanks Bryan!

    • @BV3D
      @BV3D  ปีที่แล้ว

      Glad you like them!

  • @tinoyesyes
    @tinoyesyes ปีที่แล้ว

    this guy is amazing

  • @akivasaudiobooks1049
    @akivasaudiobooks1049 2 ปีที่แล้ว

    Wow!!! This is sooooo cool!!

  • @georgebono8655
    @georgebono8655 ปีที่แล้ว

    Hi Bryan, really good stuff. Here are a few model railroading projects I would like to try. First is a turntable controller to align the track as it turns to a certain position to align up. Another is a tunnel that has a door which closes after a train enters to simulate a ventilation system. It would when closed disconnect power from the track where a train could enter the tunnel from the oppsoite side. It would also display signals to the trains for stop and go plus just for fun trigger the sound of the vent fans, too. This might need more than one unit.

  • @MulligansDen
    @MulligansDen ปีที่แล้ว

    I can see the possibility of using the servootation for a solar panel following the sun throughout the day. Every 12 minutes make and adjustment etc. … of course, to expand the idea, set up a table of start degrees (winter @ 45 and summer @ 180 for example and then let the system determine where and when to start and stop the rotation. The servo in reality could be a relay connected to a television rotor and control the panel angle that way …. Damn it, now I’ll not be able to sleep with all these variable thoughts 😃 going on all night… thanks, excellent video!

  • @MrKobyp7
    @MrKobyp7 3 ปีที่แล้ว +1

    Very cool love it thank you

    • @BV3D
      @BV3D  3 ปีที่แล้ว +1

      Thanks! Glad you liked it! 😀

  • @Pineapplepen-qb1sf
    @Pineapplepen-qb1sf 3 ปีที่แล้ว

    Please continue series

  • @johnballard4457
    @johnballard4457 3 ปีที่แล้ว +1

    I'm retired and just beginning to learn about Arduino. Your videos are extremely helpful, so thanks for that. Do you have an example of using a rotary switch or potentiometer to control servo movement?

  • @chrisb7250
    @chrisb7250 ปีที่แล้ว

    I would like to use the servo to open and close a valve, based on the depth of water in a tank. I could use the sonic distance meter to determine the depth in the tank and have the servo maintain the level. This is intended to work with a homemade sand and charcoal water filter that would normally overflow if I don’t tend to it.

  • @AndrewAHayes
    @AndrewAHayes 4 ปีที่แล้ว +8

    I have always wanted to build one of those totally useless machines with a hand (Thing, a la Adams Family) to press the switch.
    I guess now I have loads of free time I should get on with it

    • @BV3D
      @BV3D  4 ปีที่แล้ว +4

      Haha! Build it! 👍

    • @spikekent
      @spikekent 4 ปีที่แล้ว

      Yeah me too.

  • @jamesespinola9655
    @jamesespinola9655 2 ปีที่แล้ว

    thank you for your videos you taught me alot keep the videos coming sir thank you.jimmy humanity

  • @raymondcalanlang8013
    @raymondcalanlang8013 ปีที่แล้ว

    Very informative.....do you have prototype base for.elegoo mega2560?....thank you.

  • @MultiSubjector
    @MultiSubjector 3 ปีที่แล้ว

    Hey Bryan. I picked up one of these kits and have been following along with your excellent tutorials. I was able to do this mini project without any problems, and took it one step further by activating an LED and active buzzer when the time ran out. That being said, I ran into a small problem: when I use the dc input to power my uno, my servo rotates continuously instead of following my code. It works fine when connected to my pc via usb, however, when using the battery as a power source, everything messes it up. Any ideas what might be causing my issue? Thanks

  • @Kishtukal
    @Kishtukal ปีที่แล้ว

    Hi
    Can i use the sensor SR 04 with the mator to apply automatic door project pls

  • @Theuniquegirl2024
    @Theuniquegirl2024 3 ปีที่แล้ว

    hey Brian! so I had problem with my servo what it does it that it only goes 1 time and not constantly but i subscribed your vid because i like them

  • @TedSandler
    @TedSandler 3 ปีที่แล้ว

    What if you could make your own timer which uses the servo and on the second it becomes a new hour, makes a little beep?

  • @justingoldstein1577
    @justingoldstein1577 3 ปีที่แล้ว +1

    Hey Ryan I've been at this for a while and as you can imagine I source TH-cam A lot... I am really enjoying your series on the arduino projects. Easily it is the clearest most in depth and useful single tutorial source I have found, I'm too broke over the Pandemic issuse I would love to donate but that will have to wait I have subscribed and and like all your videos I just want you to know that that you In my opinion Are nailing it I don't have any puns here but your meter delivery and timing, Are excellent I have not researched you but I would have guessed you have professional background in either teaching or theater arts some kind of public production.... Well I Have been long winded and don't wish to waste You're Time But if opinions in comments mean anything To you I appreciate you very much thank you for what you're doing.

  • @duller9430
    @duller9430 2 ปีที่แล้ว +1

    It says that this project uses 6% of my storage I think my other code might not be being deleted when I upload new code should I start pressing the reset button each time I begin a new project

  • @ReavoEnd
    @ReavoEnd 4 ปีที่แล้ว

    I can see this being useful for all kinds of things. Figure out some way to setup a simple WiFi server with it and you've got an IoT controller. Stick one with a small arm near a light switch, for example.

    • @BV3D
      @BV3D  4 ปีที่แล้ว

      That's a great idea! 💡

  • @Andratos95
    @Andratos95 3 ปีที่แล้ว

    Would you damage the servo if you tried to write a value greater than 180 to it?

  • @godricentertainment
    @godricentertainment 11 หลายเดือนก่อน

    I actually have a question not a comment. My question is if you don't have the file Servo.h it will not work. I guess my question is why? By the way love watching your videos easy to follow too.

  • @07sijr
    @07sijr ปีที่แล้ว

    I am trying to find a way to control a servo with a button. But not holding it. Just a one push and it would go from 0 to 90 degrees and hit it again and it would return. Can you help me with this please?

  • @dakotacarpenter7702
    @dakotacarpenter7702 2 หลายเดือนก่อน

    I'm wanting to make an RFID lock for my door and I need to code for a servo to lock and unlock the mechanism.

  • @jamesespinola9655
    @jamesespinola9655 2 ปีที่แล้ว

    how to stop a sketch then start another or can there be two at same time

  • @jackwilliam9455
    @jackwilliam9455 3 ปีที่แล้ว

    For some reason when I try to connect to the right port the arduino doesn’t come up as an option any ideas why?

  • @Panini_Maker420
    @Panini_Maker420 3 ปีที่แล้ว

    I copied the code exactly and checked the circuit several times, but for some reason it wont work for me. I even tried it with other servos

  • @rreads4943
    @rreads4943 4 ปีที่แล้ว

    Can you make more frequent uno videos

  • @TheRoon4660
    @TheRoon4660 4 ปีที่แล้ว

    I'm sorry that this is off topic but I am trying to implement the M600 command on my Ender 3 pro with marlin 1.1.6 installed and which already has a boot loader. I followed a video showing how to do this by going into the Advance_pause_feature in configuration_adv.h and then the configuration file. When I tried to compile it in arduino ide I received this error message..."Error compiling for board sanguino 1284P boards". I know nothing about Arduino so I am stumped and am not quite sure what to do now. My friend helped me the first time when we flashed the boot loader but isn't available because of the Covid 19 "Plandemic". Do you have any suggestions what I should do now? They would be gratefully accepted.

  • @hail2287
    @hail2287 3 ปีที่แล้ว +1

    noice

  • @MioVendetta
    @MioVendetta 3 ปีที่แล้ว

    Is there a link to this code or any code cause I'm screwing up twice now following you and would like to see where I'm going wrong. Typical thanked me for my donation within hours of getting it, I've asked 2 question since nothing, can I have my money back?

  • @tikav2411
    @tikav2411 3 ปีที่แล้ว +1

    Can you make a 360 degree servo?

    • @BV3D
      @BV3D  3 ปีที่แล้ว +1

      Yes, it's possible. This video (th-cam.com/video/zZGkkzMBL28/w-d-xo.html) shows how to do it. 👍

  • @woodrowbrimm2805
    @woodrowbrimm2805 6 หลายเดือนก่อน

    I know I'm a beginner but this is getting so frustrating. Yesterday I wasted 2 hours trying to debug the original sketch. I just wasted another 2 hours trying to make the Modified Sketch work to no avail. So frustrating . Maybe tomorow it'll work.

  • @ascabusi
    @ascabusi 3 ปีที่แล้ว

    I wish u were my teacher in HS:)

  • @antoniosubnaik9848
    @antoniosubnaik9848 3 ปีที่แล้ว

    Mine not rotating

  • @welbot
    @welbot 4 ปีที่แล้ว +2

    I used a servo for my @Ivan Miranda cuckoo clock using an esp32! :D PS I almost thumbed down because no pun!!!!!

    • @BV3D
      @BV3D  4 ปีที่แล้ว +2

      Well I DID say “servos with a smile”... 😁

    • @spikekent
      @spikekent 4 ปีที่แล้ว +1

      @@BV3D I spotted it, Welbot must have dozed of 😂

    • @welbot
      @welbot 4 ปีที่แล้ว +1

      @@spikekent Or maybe I just don't get the ref? I mean, it' is actually true, that I was actually majorly drugged on muscle relaxants at the time, so it's possible I just wasn't in my right mind, but also my narcolepsy was being notoriously random all day with micro sleeps too 😂

    • @spikekent
      @spikekent 4 ปีที่แล้ว +1

      @@welbot At 30 seconds in Bryan says servos (service) with a smile. Yeah only kidding mate, I know you suffer a lot, far more than anyone should. At least you got good reasons for being a bit out of it ... I got no excuse 😂

    • @welbot
      @welbot 4 ปีที่แล้ว

      @@spikekent ahh yeah. I guess it just didn't twig at the time cos I was so drowsy 🤣

  • @user-tt7ib5po1e
    @user-tt7ib5po1e 3 ปีที่แล้ว

    i broke one of my servo's little gear in the box
    so i coudnt use a servo until i buy a new one
    :C

  • @wherami
    @wherami 2 ปีที่แล้ว

    All of my errors have been incompatible modules in 2022 . Sigh

  • @exoticsaga-1238
    @exoticsaga-1238 4 ปีที่แล้ว +3

    you at least type the code others don't AMAZING

    • @BV3D
      @BV3D  4 ปีที่แล้ว +1

      Hi ExoticSaga-12 😃 Yes, unless it's a hugely long or complicated bit of code, I prefer to type it in. I encourage everyone to do that, because it helps to give you a feel for the language. It helps get you used to typing a semicolon before you hit the Return key, for example. Plus, I think you get a little more sense of accomplishment when you are putting the code into the IDE instead of just pasting it in, and it compiles! 😌 Thanks for the comment!