├── Multiple-Servo-Control-Joystick.ino └── README.md /Multiple-Servo-Control-Joystick.ino: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | Servo servo1; 4 | Servo servo2; 5 | int joyX = 0; 6 | int joyY = 1; 7 | 8 | int servoVal; 9 | 10 | void setup() 11 | { 12 | servo1.attach(3); 13 | servo2.attach(5); 14 | } 15 | 16 | void loop() 17 | { 18 | 19 | servoVal = analogRead(joyX); 20 | servoVal = map(servoVal, 0, 1023, 0, 180); 21 | servo1.write(servoVal); 22 | 23 | servoVal = analogRead(joyY); 24 | servoVal = map(servoVal, 0, 1023, 70, 180); 25 | servo2.write(servoVal); 26 | delay(15); 27 | } 28 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Multiple Servo Motor Control with Joystick and Arduino 2 | In this tutorial, we will learn how to use multi-servo with Joystick. We will control two pcs servo motor with one Joystick. You can implement your robotic arm projects with reference to this tutorial. Of course we will use external battery / power when doing this. 3 |

4 | **Full tutorial:** https://youtu.be/kA_pbMR6jVs

5 | [![IMAGE ALT TEXT HERE](http://img.youtube.com/vi/kA_pbMR6jVs/0.jpg)](http://www.youtube.com/watch?v=kA_pbMR6jVs)

6 | # Required Hardwares:
7 | - 1x Arduino UNO R3: http://bit.ly/2xt9MVk 8 | - 2x Servo Motor: http://bit.ly/2JfGtuj 9 | - 1x Joystick Module: http://bit.ly/2kJkU7a 10 | - 3 in 1 Jumper Wire: http://bit.ly/2J6de9E 11 | - 1x Breadboard: http://bit.ly/2H9YSUa 12 | - Arduino Compatible SCM & Module: http://bit.ly/2J2AFF7 13 | # Connections:
14 | - The external battery VCC / GND connect to the breadboard. 15 | - The Arduino GND connect to the breadboard's GND input 16 | - The Servo1 VCC and GND connect to the breadboard's VCC / GND inputs 17 | - The Servo1 Signal connect to the Arduino Digital PWM 3 18 | - The Servo2 VCC and GND connect to the breadboard's VCC / GND inputs 19 | - The Servo2 Signal connect to the Arduino Digital PWM 5 20 | - The Joystick GND connect to the Arduino GND 21 | - The Joystick VCC connect to the Arduino VCC 22 | - The Joystick 'X' (in some modules 'H') connect to the Arduino Analog 0 23 | - The Joystick 'Y' (in some modules 'V') connect to the Arduino Analog 1 24 | - The Joystick 'SW' (switch or button) not connected. 25 | --------------------------------------------------------------------------------