Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Pin layout

The joystick has a total of 5 pins: power supply, ground, X-axis output, Y-axis output, and switch output pin.

joystick
Joystick Pin Details
GND Ground pin. Should be connected to the Ground of the circuit.
VCC Power supply pin (typically 5 V or 3.3 V).
VRX The X-axis analog output pin varies its voltage based on the joystick's horizontal position, ranging from 0 V to VCC as the joystick is moved left and right.
VRY The Y-axis analog output pin varies its voltage based on the joystick's vertical position, ranging from 0 V to VCC as the joystick is moved up and down.
SW Switch pin. When the joystick knob is pressed, this pin is typically pulled LOW (to GND).