Preview build — page text is a draft awaiting human review. Code badges come from real compiles. The flasher is real but not yet hardware-tested; the Playground is still a preview.

Dual-axis joystick module (KY-023)

KY-023 dual-axis joystick: GND, +5V, VRx, VRy, SW pins, wiring to Arduino, ESP32 and Pico ADC pins, centre calibration and the push switch.

Analog

Community draft — report a mistake

CategoryInput
InterfaceAnalog
Voltage3.3–5 V
Typical price₹60

3.3 V or 5 V? VRx and VRy swing between 0 V and the module’s supply. On ESP32 and Pico, power the joystick from 3.3 V (the pin labelled +5V is just the supply input) so the analog outputs never exceed 3.3 V.

This thumb joystick is two 10 kΩ potentiometers at right angles plus a push switch. Each axis outputs a voltage proportional to stick position, so you read it with two analog pins: about half-scale at rest, near 0 at one end and near full-scale at the other.

It is the easiest way to steer a robot car, aim a pan-tilt servo mount or move a cursor on a small display.

Mind the ADC: an Uno reads 0–1023, an ESP32 0–4095 and a Pico (MicroPython) 0–65535 — map the values to the range your project needs.

Pinout

PinWhat it does
GNDGround
+5VSupply for the potentiometers — use 3.3 V on 3.3 V boards
VRxX-axis analog output
VRyY-axis analog output
SWPush switch to GND when the stick is pressed — needs a pull-up

Use it with

Common errors

Centre isn’t half-scale

Cheap pots rest anywhere from about 45–55 %. Read the centre at start-up and treat a small band around it as zero (a dead zone).

Values jump around on ESP32

The ESP32 ADC is noisy and non-linear near the ends. Average several readings, and use ADC1 pins (32–39) if Wi-Fi is on.

Button reads random values

SW has no pull-up on the module. Use pinMode(SW, INPUT_PULLUP).

↑↓ to move · Enter to open