- Arduino (an Uno should be enough)
- A joystick
- 2 Servos (small enough that your arduino can power them both without an external power source)
- A breadboard (only if you want to see the wires better)
- Attach the joystick
VCC
to 5vGND
to groundHOR
to an analogue input (default is 0)VER
to an analogue input (default is 1)
- Connect the servos
- red to 5v
- black/brown to ground
- yellow/orange
- X-axis/horizontal into a digital input (default is 4)
- Y-axis/vertical into a digital input (default is 3)
- Change your settings in main.cpp
SERIAL_PRINT
if you would likeSerial.print
debug messagesXPINOUT
if you use a different pin for the horizontal servoYPINOUT
if you use a different pin for the vertical servoXPININ
if you use a different analogue pin for the horizontal input from the joystickYPININ
if you use a different analogue pin for the vertical input from the joystick
- Upload the program
- Control the servos :)