Source Code: github.com/MertArduino/Multiple-Servo-Motor-Control-with-Joystick-and-Arduino Recommended Items: Use Your Muscles in Project - amzn.to/3wdL45C 37 Sensor & Module Packages - amzn.to/3m66WeQ Try this Robot Arm - amzn.to/3fq8DCl Best Resin 3D Printer - amzn.to/39tY8KB Arduino Compatible Kits - bit.ly/2J2AFF7 Banggood Spring Sale - bit.ly/3slMbOn
@GhostRiderSpiritOfVengeance3 жыл бұрын
I spent my entire weekend looking for a tutorial that describes how to set this up in full detail from a beginner standpoint. Thank you.
@Julians_vlogs9 ай бұрын
Same
@samuelhawksworth19237 жыл бұрын
I’m subbing to you dude, I’ve been needing this help with my project for a year and your the first person to help me in an easy way
@dngineer11 ай бұрын
Perfect. Came in clutch for my Engineering NEA exam. Thank you so much
@lordnever16 жыл бұрын
This is my very first Arduino project and it worked great! I am so happy that I watched this video. Time for my next project, thanks a lot great video!
@kamenstefanov28116 жыл бұрын
Didn't you have error in the code?
@kkrokingkiller4564 жыл бұрын
@@kamenstefanov2811 for me it does't work
@kamenstefanov28114 жыл бұрын
@@kkrokingkiller456 it was a long time ago but i remeber that the mistake was very simple if you look closely you'd find it
@kkrokingkiller4564 жыл бұрын
@@kamenstefanov2811 thanks
@aniketpratap83873 жыл бұрын
Excellent and Such a simple explanation ….. People like you make this world a better place....
@MarineSimFan3 ай бұрын
Maker 101 it's a nice teacher. (btw nice tutorial thank you) I don't think anyone on KZbin has ever shown how to control both servos with a single 2-axis joystick in different way. both the same time and.... The scheme of this operation is apparently simple, using one 2-axis joystick, but I don't know how to program it. Of course, a bidirectional version for servos is enough. description: joystick front: both engines forward joystick reverse: both engines reverse joystick left: left engine reverse right engine forward joystick right: left engine forward - right engine reverse It would be useful for a tank with A2122 brushless motors - connected to ESC controllers, but I haven't seen such a tutorial on Arduino yet. 😓
@vidmantasjuska40848 жыл бұрын
Here is code people //add the servo libary #include //define our servos Servo servo1; Servo servo2; //define joystick pins (Analog) int joyX = 0; int joyY = 1; //variable to read the values from the analog pins int joyVal; void setup () { //attaches our servos on pins PWM 3-5 servo1.attach(3); servo2.attach(5); } void loop () { //read the value of joystick (betwen 0-1023) joyVal = analogRead(joyX); joyVal = map(joyVal, 0, 1023, 0, 180); //servo value betven 0-180 servo1.write(joyVal); //set the servo position acording to the joystick value joyVal = analogRead(joyY); joyVal = map (joyVal, 0, 1023, 0, 180); servo2.write(joyVal); delay(15); }
@Melon-eu1sr7 жыл бұрын
Vidmantas Juska your a life saver!!
@maevebaksa7 жыл бұрын
Thanks from Budapest!
@MrHristoB7 жыл бұрын
Aciu!!! :-)
@mettigel13577 жыл бұрын
Thank You
@pablo271idn97 жыл бұрын
thx
@aldrinlimos51594 жыл бұрын
Just bought an Arduino recently, and I hadn't read any of the documentation yet. Took me an hour to try and fiddle with the wonky 0-512,512-1024 range with some crude equations to have the servo move with the switch. Kept freezing and moving occasionally before I decided to look for a video like this :P.
@MultiCreasey8 жыл бұрын
Thank you, a really clear and helpful video. Appreciate your time in making it and for sharing.
@maevebaksa7 жыл бұрын
Agreed! +1 Subscriber!
@luisangelherndezramirez4334 жыл бұрын
Holaaaa
@FerencHegyi Жыл бұрын
Thank you, it was very useful for me. Greetings from Hungary.
@zzzzzz...99028 жыл бұрын
It works! It works! The dislike button works! Joke, the circuit works and the like button works. Runs like my girlfriend.
@zzzzzz...99028 жыл бұрын
Your welcome. Sorry to hear about your computer, I fix them for a living, xd.
@tommybirchify6 жыл бұрын
@@zzzzzz...9902 good one XD
@hieroja14 жыл бұрын
wtf bro
@mateom72014 жыл бұрын
So dirty?
@realSethMeyers3 жыл бұрын
I have tuberculosis
@indivsultanabinavsi89097 жыл бұрын
Not All Heroes wearing capes. Thank you for the tutorial
@zTowerDive2 жыл бұрын
Awesome video, dude. First time using servos and i feel very accomplished. +1 like
@dokepravin29162 жыл бұрын
cleanest video made for any Arduino project. Thank you for sharing!
@Maggot-ov4eu6 жыл бұрын
This is so under appreciated. Thy is had to be the best tutorial
@daxliniere3 жыл бұрын
The problem is that when you release the joystick, the motor returns to the centre position. The code also needs some averaging to account for the jittery values from the A/D converter.
@PatrickGreil-n6j Жыл бұрын
Have you found a solution to this?
@fazmisharaff88397 жыл бұрын
Plz make a wireless version using a bluetooth module but great video you just got a new sub!
@vivekdixit51497 жыл бұрын
Fazmi Sharaff i am agree with u
@MrHenryrolls7 жыл бұрын
Lovely clear tutorials Mert. Thank you. Just one concern, the servo in my kit looks identical (SG90), yet checking its operating voltage online it's 3.0-7.2v (ideally 4.8v). I don't want to blow it on my first attempt.
@derrickchilders6185 Жыл бұрын
It’s blew my board! Don’t try it.
@mikeoxmaul9386 Жыл бұрын
@Frectieyou don't need to add a battery if that is the servo spec, just plug it straight into the board
@stefan77457 жыл бұрын
Your video helped out a lot in the turret project I was doing, thank you very much!
@saqibcom6 жыл бұрын
//add the servo library #include //define our servos Servo servo1; Servo servo2; //define joystick pins (Analog) int joyX = 0; int joyY = 1; //variable to read the values from the analog pins int joyVal; void setup() { //attaches our servos on pin PWM 3-5 servo1.attach(3); servo2.attach(5); } void loop() { //read the value of joystick (between 0-1023) joyVal = analogRead(joyX); joyVal = map (joyVal, 0, 1023, 0, 180); //servo value between 0-180 servo1.write(joyVal); //set the servo position according to the joystick value joyVal = analogRead(joyY); joyVal = map (joyVal, 0, 1023, 0, 180); servo2.write(joyVal); delay(15); }
@hkiceman0017 жыл бұрын
Thank you, a very helpful video for me. I watch all your video to learn arduino...thx too much
@mohamedosama93126 жыл бұрын
my servos were good and the projectwas very good. and it worked well. i unpluged the arduino. and after 30 minutes i pluged it again the 2 servos become crazy.
@veronicastanley-hooper98616 жыл бұрын
Bad servo motor or tired battery. Mine did this on start up and I swapped out the motor and it worked fine. Later the set-up didn't work. I swapped out the battery and it worked beautifully.
@realtrickybilly7 жыл бұрын
Thank you. I have made your project, used different materials for the arms though. Awesome robot arm.
@mushahidhassan34375 жыл бұрын
Can u guide me ? And how can i contact you ?
@benfree_man5 жыл бұрын
I appreciate this so much. Helped me a ton!
@rebeccatorbergsen3 жыл бұрын
this is why i follow you, quality videos
@loganmitchell23884 жыл бұрын
best tutorial ive seen so far! how would I make the servo stop at its givin location when I let off of the joystick?
@b3dubbs723 жыл бұрын
probably set the position of the servo if the joystick returns to neutral as the last read value. I'm not sure how to you'd go about doing that but I'm sure there's a 'last' function
@spamton_bigshot285 ай бұрын
I understand this very well but could you please tell if and how it possible to add more joysticks and servos for those ones all at once. If so thankd ❤
@Profe_Zandor Жыл бұрын
wow soy de Colombia y me gustó el canal video, tiene un curso completo de Arduino?, Thanks
@---is8zn Жыл бұрын
Thank you for such great code algorythm and so detailed comments //.... may god-machine bless you with his divine wisdom
@mineroyales81183 жыл бұрын
same it help me the best its has code and pins to show conect
@VirtualWater4 ай бұрын
Can you make a video on how to control a servo motor using a digital joystick and maybe add eye tracking?
@xiaosan121620096 жыл бұрын
谢谢,好视频,通俗易懂,看了就想自己尝试一下
@syahrulzahwan7 жыл бұрын
hope you will keep making more cool projects u earn my sub
@Jacobtaylor17758 жыл бұрын
Thank you very much! The wiring and code worked flawlessly! (copied code from video)
@omicron2962 жыл бұрын
Parabéns pelo vídeo e por compartilhar o seu conhecimento! 🙂
@---is8zn Жыл бұрын
and also i can propose you to make mutated scheme - where single joystick controlling one servo and one regular stepper, or two steppers and one motor will be controlled by joystick button.
@hetshah74904 жыл бұрын
Simple and sweet Thank you I will try it in avr codings
@vg50287 жыл бұрын
I read that it is not recommended to power an Arduino using a 9V battery as in order to step the voltage down, the Arduino's on board linear voltage regulator has to waste a lot of power. This causes 2 things: 1. The regulator gets quite hot 2. The battery is drained very quickly as 40% of its energy is wasted as heat It is recommended to use an external voltage regulator to step down the 9V to the Arduino's compatible 5V, which would solve the arduino's on board regulator's heating issue. Even better would be to use a switching regulator, which would solve both the battery drainage and heating issue.
@ZenHulk7 жыл бұрын
i'm a beginner....can i hook it up just as you directed, but have two servos work on the Y and one on the X axis. Thank You i find lots of useful stuff on your tutorials.
@zcxvasdfqwer12347 жыл бұрын
Very nice short clear video.
@thedirty5306 жыл бұрын
Awesome Videos! Content and editing are great!
@kung-fupanda-vu5ns7 жыл бұрын
thank you for the video.. at last I got the exact video which I wanted
@manishkarsh6836 Жыл бұрын
Please provide a grip for grabbing the object by using this 🙏🙏
@wahidaaziz95887 жыл бұрын
Thank you for the video. It really help me. How about use 3 servo motor?
@oOcitizenOo7 жыл бұрын
Accidentaly ran into your channel. Subbed! And like for the country music :)
@MadhuVishwanath7 жыл бұрын
Why was the battery used? The modules could be powered by the arduino right?
@lot10games5 жыл бұрын
Is it ok to connect to 5V of the arduino board a 9V battery? The VIN pin is more suitable for that... I think .Cool video
@mohammedfarhat3257 жыл бұрын
The codes are easy to understand
@andreabinotto99307 жыл бұрын
Thank you, great tutorial ;), what's the name of this song?
@charlescaudill670 Жыл бұрын
Is there any way to control the servos as a unit. I need both servos to go forward when i push the joystick forward but one to back off as i pull the stick sideways. All I’ve been able to find is the configuration shown in this video
@pepmichael90457 жыл бұрын
Can I ask you some question? Why does some of my servo rotate 360 degree? Thx. for tutorial. It's easy to understand :)
@mattdriller17 жыл бұрын
Excellent tutorial, Thanks!! It would have been extra cool if you had popped up a link to the sketch. Thanks again.
@四喜丸子-c7q8 жыл бұрын
hello ! I like your video very much. It is clear and funny. What' s more, the music and the background are very well. However, I have a question: How can I use arduino with mini-joystick to control serve motor wirelessly ? I don't know if you have time to reply me, but I look forwarding to hearing from you.
@dhakshingk4 жыл бұрын
hi there, awesome video, but do you know if it is possible to connect the joystick ground and vcc to the breadboard?
@magicianofelectronics9514 жыл бұрын
if I have got you right, Yes, you can do it by making common Vcc and ground line on bread board,
@JustinS063 жыл бұрын
No I wouldn't. There are two circuits here: the 9v circuit for the 2 servo's, and the 5v circuit for the joystick. You could of course hook the ground up to the other side of the bread board. As long as it isn't interfering with the other circuit, you'll be fine.
@KIVPush7 жыл бұрын
Hello, wonderful video. I built one with 4 servos. 2 servos are controlled if the button is not pressed. The other 2 are controlled when the button IS pressed. I can only control the second 2 when the button is pressed and held down. Is there a way to write a code so each time you click the button it switches back and forth between each servo set? Like if I click the button and then release it, it switches to one set. If I click it again and release it, it switches back to the first set. Is there a way to do this?
@JustinS063 жыл бұрын
I know I'm late, but for those looking for the same thing here it is: First of all, it's really easy. You just need a boolean which is either True (1st mode) or False (2d mode). At the start of loop(), check if the button has been pressed, if so do this: bool Mode = True// True will be the 1st mode and False is the 2d mode. void loop(){ if (the button has been pressed) Mode = !Mode // Doing this sets mode equal to the opposite of mode. So: if it's True, it will be False and vice versa. // check if Mode is true, if so, control the first 2 servos // check if Mode is false, if so control the last 2 servos }
@zaido87357 жыл бұрын
Breadboard un toprağını arduino nun toprağına bağlamandaki sebep nedir? Ayrıca anlatım tertemiz çok başarılı.
@adin_3360 Жыл бұрын
did servo need library for programing it?
@corywilliamsmith7 жыл бұрын
This is amazing. Thank you. This will be my next project for sure. can you teach me how to replace one of those servos with a DC motor? :]
@syahrulzahwan7 жыл бұрын
man ty so much really what im looking for thank god bless u man!!! because i am searching this to make the robot arm actually😂
@simoneleccese15364 жыл бұрын
Me too
@kaidnl7 жыл бұрын
Hello Mert, I want to do the same as this, only I want the stepper to make little steps as I move the joystick. and when I centre the joystick It should stay at the last location until I move the joystick again, hope you understand what I mean. Can you show us how you would change the code for that?
@teedee93936 жыл бұрын
Does the battery need to be connected directly to the breadboard, or can I connect it via the Arduino's power port?
@kajus.v.42204 жыл бұрын
what is the name of the program
@乇R-u6r Жыл бұрын
Que librerías ocupa ?, es que tengo problemas con el codigo y supongo son por las librerías
@anon_efx Жыл бұрын
this is what i was looking for lol finnaly i found it
@stefan77457 жыл бұрын
Hi 👋🏻, do you use a normal 2 axis arduino joystick?
@scara67093 жыл бұрын
can i connect two joysticks to the 9v and the gnd of the battery?
@ojastheai4 жыл бұрын
A perfect tutorial.... Thank you it helped me a lot...😊😊
@Ratpack306 жыл бұрын
a big thank you, this helped me with my little project.....
@samopal117 жыл бұрын
GOOD video!.. can you make it with nfr24l01 please??...
@Soniboy847 жыл бұрын
This was very helpful, thank you for the video!
@danieldemaria3 жыл бұрын
Se pueden conectar 6 servos en paralelos 3 que se muevan en X y 3 que se muevan en Y? con este mismo procedimiento?
@juliennbitt33764 жыл бұрын
What is the big white board thing that you plug the wires in to called??
@magicianofelectronics9514 жыл бұрын
Bread board
@JesseGunnRocksnyc6 жыл бұрын
Nice! I think this is what I was looking for! But is there a way to add ease in and ease out? In other words smoothing when starting and stopping. So it is not abrupt.
@JesseGunnRocksnyc6 жыл бұрын
Also I noticed that I have 6 wires 3 black red and white on top and 3 on the side. Do they share the red wire?
@technikfreaksmj53214 жыл бұрын
Vcc = 5 Volts
@J.H.DESIGNS Жыл бұрын
Thanks for this video 😄
@reeceburns56815 жыл бұрын
is there anyway to get the servos to hold their position until you want it to go more or another way?
@frobinson24136 жыл бұрын
I know I am a late starter. But I would like to use the same setup but control 2 stepper motors instead. I am a complete noob, but could I use the same code?
@notoikmo3 жыл бұрын
hey just asking if i wanted a second joystick that controlled to more servos how would i do it?
@thesheikhtutor49822 жыл бұрын
Can I control 5bldc motors and 1 servo motor with this joystick??
@acifans40164 жыл бұрын
Can you show how to put 13 servo motor on the arduino and breadboard.
@princening6795 жыл бұрын
Sir if we move forward joy forward arm should move forward even joystick come to original position code please
@83eroastery967 жыл бұрын
Deciding on Arduino or Phidgets then I found your site. My project is controlling a valve with a 10k pot. I am told the only type I can use is a speed pot. But none available at 10k only 5k. The has 0-10vdc. As you turn to the left it closes the valve and to the right opens it. It needs to be somewhat sensitive. Can this be done with Arduino Thanks Charlie
@MrTaz65528 жыл бұрын
Great to see some new, good, arduino videos. Thanks
@user-wg6ik1wi6s4 жыл бұрын
What about a Wireless joystick for servo motor control? Can that be done with Arduino?
@magicianofelectronics9514 жыл бұрын
Yes
@turtlebrownies87017 жыл бұрын
is it ok if instead of using a custom battery unit, I use a power supply module?
@Electromaniaworld7 жыл бұрын
thanks. i was looking for this to control servo for toy truck. i want to add servo to my police car shown in my recent video. any suggestions. i want to have moving wiper
@carolineh.93035 ай бұрын
can you modify the code and send it to me so that both servos will follow the same movement only? like there is no controlling one seprately
@vornamenachname22603 ай бұрын
connect both servos at the Digital Pin 3.
@grahamtech7 жыл бұрын
hi im building a robotic hand , and i wanted to know if thers any way you could tell me how to control 5 servos with analog joysticks or one joystick to control all five
@Harlequin438 жыл бұрын
Do you know where I can possibly get a generic sketch for a generiric arduino powered hexapod? So that I could control with a PS dualshock gamepad via bluetooth. I'm way too stupid to write it myself.
@AhmadFanoon8 жыл бұрын
Please I want to explain the work of reagent water.
@rajeevabariar77378 жыл бұрын
great dude hey I wanted to make a simple nano quad using small DC motors(the one used in RC helicopters) but how can I vary the speed of four motors simultaneously please reply
@agustinvercesi97647 жыл бұрын
Hi, would the code work the same with an arduino nano or change into something? Thank you
@Fitzling3 жыл бұрын
I think it would be the same, just watch out. A servo needs to be connected to PWM and in don't know if the Nano has enough
@romeo12455 жыл бұрын
is it possible to use other servo like 1 small ad 1 big servo in this code ?
@jexter65785 жыл бұрын
Yup . Servos are powered from external supply , only signal is coming from uno , u can use any other ..
@durvesularevanth17977 жыл бұрын
can u pls instruct me how to controll aesc with rc tx interfacing with arduino .....reading the signal and then delivering them to the esc.
@zackmilleryt39453 жыл бұрын
Is there a way to control a third servo with a single joystick?
@deepakgoyal45536 жыл бұрын
hello Mert Arduino and Tech.I am making a hand controlled accelerator in which i am using a potentiometer which will sense the movement and give the input to arduino. Thereafter Arduino will scale the input rotate the servo motor which will press the accelerator pedal. Canyou tell me which type of potentiometer should i use and how to code it
@lobot47805 жыл бұрын
Hey, does it have to be an Arduino Uno, or could I use a pro micro or a nano?
@hots22154 жыл бұрын
Hi there I got a question Imagine a rc receiver which is powered up by an external battery and is sending pwm signal to a servo Now, I got an arduino and I want to read the signal is being sent to the servo from the receiver but my arduino is not powered by that battery how should I wire up the system? thanks for your help!
@magicianofelectronics9514 жыл бұрын
You can read normal output in serial monitor, and what you want to do by not powering Arduino with same power supply?
@ketrvn_me5 жыл бұрын
you are welcome
@CoyoteFPV8 жыл бұрын
Could you share the code to enable the joypads momentary switch to scroll through a 3rd servo channel. it 1000us 1500us and then on the third press 2000us