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

Поделиться
HTML-код
  • Опубликовано: 15 окт 2024
  • 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.thingivers...
    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: ruclips.net/user/bv...
    ☕️ Buy Me a Coffee: www.buymeacoff...
    👍🏻 PayPal tip jar: www.paypal.me/...
    *️⃣ The BV3D Channel Storefront on Amazon:
    • www.amazon.com...
    *️⃣ 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/?r...
    • Pergear: bit.ly/BV3Dper...
    • 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

Комментарии • 76

  • @JeffSararas
    @JeffSararas 3 года назад +9

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

  • @camshifft9937
    @camshifft9937 4 года назад +23

    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!

  • @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.

  • @dogfightdiary5712
    @dogfightdiary5712 Год назад +2

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

  • @AndrewFulo
    @AndrewFulo 3 года назад

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

  • @apfi3341
    @apfi3341 4 года назад +20

    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! 👍

  • @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 2 года назад +1

    These videos have been great, thanks Bryan!

    • @BV3D
      @BV3D  2 года назад

      Glad you like them!

  • @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!

  • @georgebono8655
    @georgebono8655 2 года назад

    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.

  • @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 Год назад

    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.

  • @johnrelins4282
    @johnrelins4282 Год назад

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

  • @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?

  • @akivasaudiobooks1049
    @akivasaudiobooks1049 2 года назад

    Wow!!! This is sooooo cool!!

  • @tinoyesyes
    @tinoyesyes Год назад

    this guy is amazing

  • @chrisb7250
    @chrisb7250 2 года назад

    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.

  • @MrKobyp7
    @MrKobyp7 3 года назад +1

    Very cool love it thank you

    • @BV3D
      @BV3D  3 года назад +1

      Thanks! Glad you liked it! 😀

  • @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

  • @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.

  • @godricentertainment
    @godricentertainment Год назад

    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.

  • @raymondcalanlang8013
    @raymondcalanlang8013 Год назад

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

  • @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! 💡

  • @justingoldstein1577
    @justingoldstein1577 4 года назад +1

    Hey Ryan I've been at this for a while and as you can imagine I source RUclips 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.

  • @Kishtukal
    @Kishtukal Год назад

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

  • @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

  • @mikechunnic2018
    @mikechunnic2018 Месяц назад

    is there a website to get cad models of the components such as the servos, the LED board and so o?

  • @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?

  • @jamesespinola9655
    @jamesespinola9655 3 года назад

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

  • @Pineapplepen-qb1sf
    @Pineapplepen-qb1sf 4 года назад

    Please continue series

  • @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.

  • @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

  • @Andratos95
    @Andratos95 3 года назад

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

  • @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?

  • @dakotacarpenter7702
    @dakotacarpenter7702 7 месяцев назад

    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.

  • @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?

  • @BennydoesstuffYT
    @BennydoesstuffYT 24 дня назад

    sucks that the motors are so cheaply made, the red wire on my servo just broke off now I need to solder it back on, same issue happened with the normal motor

  • @jamesespinola9655
    @jamesespinola9655 3 года назад

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

  • @TedSandler
    @TedSandler 4 года назад

    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?

  • @Panini_Maker420
    @Panini_Maker420 4 года назад

    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

  • @woodrowbrimm2805
    @woodrowbrimm2805 11 месяцев назад

    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.

  • @tikav2411
    @tikav2411 3 года назад +1

    Can you make a 360 degree servo?

    • @BV3D
      @BV3D  3 года назад +1

      Yes, it's possible. This video (ruclips.net/video/zZGkkzMBL28/видео.html) shows how to do it. 👍

  • @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 🤣

  • @rreads4943
    @rreads4943 4 года назад

    Can you make more frequent uno videos

  • @ascabusi
    @ascabusi 3 года назад

    I wish u were my teacher in HS:)

  • @wilson214-n3e
    @wilson214-n3e 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

  • @hail2287
    @hail2287 3 года назад +1

    noice

  • @antoniosubnaik9848
    @antoniosubnaik9848 4 года назад

    Mine not rotating

  • @wherami
    @wherami 2 года назад

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

  • @Turnipmator
    @Turnipmator 22 дня назад +1

    thats a stepper motor not a servo

    • @BV3D
      @BV3D  22 дня назад +1

      Nope, that's 100% a servo. It's a geared DC motor with a potentiometer built in to provide positioning feedback.

    • @Turnipmator
      @Turnipmator 22 дня назад +1

      @@BV3D oh im new to stuff like this sorry😅😅😅

    • @BV3D
      @BV3D  22 дня назад

      @@Turnipmator No problem! 😉

    • @Turnipmator
      @Turnipmator 22 дня назад +1

      @@BV3D i know this is off topic but you should check out the rare occasions they have really good music

    • @BV3D
      @BV3D  22 дня назад

      @@Turnipmator Thanks, I’ll check them out!

  • @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!