Skip to content
A

Input / Touch

Interfacing Joystick Module Input / Touch with Arduino Uno

What is the Joystick Module?

Joystick Module practical reference

The PS2-style analog joystick module is a two-axis, spring-centered thumbstick built from two potentiometers — one for the X axis and one for the Y axis — plus a momentary push-button triggered by pressing straight down on the stick. It reports smooth analog positions on each axis rather than simple on/off directions, making it the standard input for robot controllers, pan-tilt camera rigs, and any project that needs proportional, joystick-style control.

Key specifications

  • Axes: 2-axis analog (X and Y), each driven by an independent 10kΩ potentiometer
  • Operating voltage: 3.3V–5V DC
  • Output type: Analog voltage per axis, proportional to stick position (read with analogRead())
  • Center position output: ~half of supply voltage (e.g. ~2.5V at 5V supply) when stick is at rest
  • Push-button: Momentary switch (SW pin), activated by pressing the stick down, active LOW
  • Interface: 2 analog pins (VRx, VRy) + 1 digital pin (SW)
  • Mechanical travel: Spring-loaded, self-centering in both axes

Pinout and connection notes

Each axis needs its own analogRead()-capable pin, and the SW button pin should be configured with INPUT_PULLUP since it pulls to GND when pressed. On 3.3V boards like the ESP32, the module still works fine at 3.3V supply, though the analog center-point and range will scale down accordingly.

  • GND: Ground
  • +5V: Power, 3.3–5V DC
  • VRx: X-axis analog output — connect to an analog input pin
  • VRy: Y-axis analog output — connect to an analog input pin
  • SW: Push-button output, active LOW — connect to a digital input pin with pull-up enabled

Integration checklist

  1. Confirm the exact part number and breakout-board revision.
  2. Verify supply voltage, current demand, logic levels, and signal direction against the datasheet.
  3. Check controller pin assignments and bus address or interface mode against the example code.
  4. Power up with external loads disconnected, then test signals before full integration.
  5. If readings or communication fail, check power and ground first, then pin mapping, interface settings, and library initialization.

Troubleshooting and reproducibility

Record the board used, wiring, library/version, supply arrangement, and measured behavior. Use the selected board-specific wiring example as the source of truth. Never assume visually similar modules share identical voltage tolerance or pin order.

Setting Up Joystick Module with Arduino Uno

Library

None — built-in analogRead/digitalRead by —

No library needed; uses core Arduino functions only.

Wiring

Component pinArduino Uno pinNote
+5V5V
GNDGND
VRxA0
VRyA1
SWD2Press-to-click button, active LOW — use INPUT_PULLUP.

Swipe sideways to see every column →

C++
  • Centre position reads roughly 512 on both axes but varies module to module — calibrate at startup rather than hardcoding 512.
  • SW is a separate physical pushbutton triggered by pressing the stick down, unrelated to X/Y position.

Related Components

Related Guides & Projects