Raspberry Pi Pico - Joystick - Servo Motor

This guide will show you how to control two servo motors or a pan-tilt kit using a Raspberry Pi Pico and a joystick.

A joystick has two control parts named potentiometers, set in a cross pattern, called the X-axis and Y-axis. These potentiometers create signals, known as X-value and Y-value, which emerge from the VRX and VRY pins of the joystick. We use these signals to operate two servo motors: the X-value controls servo motor #1 and the Y-value controls servo motor #2. When used with a pan-tilt kit, the two servo motors collaborate to move in three dimensions.

The application can be used in two ways: