Components Used For Potentiometer:
- 1 x Arduino Uno ( You can use other boards also )
- 10 x Jumper Wires M-F
- 1 x Breadboard
- 2 x Servo Mini ( Metal Gear Prefered)
- 1 x Joystick
- If Big Servo You need an External power supply ( Battery, Adapter,…)
This project we will make a control two Servo Motor using a joystick. Which is used in robotics for aiming 360 environments for a camera, laser beam etc
- This is a basic program to check Servo with joystick
- You have size of Servo
- You have type of Servo
- Metal gear
- Plastic gear
- Take Breadboard
- Take two Servo it will have three color input Yellow/orange, Red, Brown
- Now connect the brown wire with the jumper wire and then the jumper wire to the negative to the battery.
- Similarly the red wire to the Positive of battery and the yellow to the pin 3 of Arduino.
- Repeat the same process for the 2nd Servomotor and the yellow cable to pin 5 of Arduino.
- Now take the Joystick and connect the GND of the joystick to negative of the battery.
- Connect the Vcc of the joystick to the Vcc of the Arduino.
- Now connect the VRx of the joystick to A0 (Analog A0 of Arduino) and the VRy of the joystick to A1 (Analog A1 of Arduino).
- Connect Arduino to your Laptop/PC by USB Cable.( we use A to B USB cable for Arduino which is also used in printers )
- Open Arduino IDE ( You can download it from here or you can use online platform Arduino Web editor )
- Go to File > New type the code given above.
- Check program, save it and then upload it.
- You can change the direction of the joystick and according to that, the motor will rotate.