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,…)

 

Description

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

Quick points

  • This is a basic program to check Servo with joystick
  • You have size of Servo
    • Big
    • Small
  • You have type of Servo
    • Metal gear
    • Plastic gear

Min Required  – 30 mins

Lines of Code

Connection

Procedure

  1. Take Breadboard
  2. Take two Servo it will have three color input  Yellow/orange, Red, Brown
  3. Now connect the brown wire with the jumper wire and then the jumper wire to the negative to the battery.
  4. Similarly the red wire to the Positive of battery and the yellow to the pin 3 of Arduino.
  5. Repeat the same process for the 2nd Servomotor and the yellow cable to pin 5 of Arduino.
  6. Now take the Joystick and connect the GND of the joystick to negative of the battery.
  7. Connect the Vcc of the joystick to the Vcc of the Arduino.
  8. 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).
  9. Connect Arduino to your Laptop/PC by USB Cable.( we use A to B USB cable for Arduino which is also used in printers )
  10. Open Arduino IDE ( You can download it from here or you can use online platform Arduino Web editor )
  11. Go to File > New type the code given above.
  12. Check program, save it and then upload it.
  13. You can change the direction of the joystick and according to that, the motor will rotate.