Arduino UNO R4 - Joystick - Servo Motor

In this guide, we'll learn how to use an Arduino UNO R4 and a joystick to control two servo motors or a pan-tilt kit.

A joystick has two controls called potentiometers, placed at right angles to each other, known as the X-axis and Y-axis. These potentiometers produce signals, called X-value and Y-value, which come out from the VRX and VRY pins of the joystick. We use these signals to control two servo motors: the X-value moves servo motor #1 and the Y-value moves servo motor #2. When you use these with a pan-tilt kit, the two servo motors work together to move in three dimensions.

There are two examples of how the application can be used: