Built on XDAI built a computer mouse with an ESP32, and it's both amazing and absolutely terribleBy Adam ConwayCompatibility checks
1 warning
GPIO18 on KY-023 analog joystick stops reading if your project turns on Wi-Fi.
Wiring steps
- 1
KY-023 analog joystick
- GNDtoGND
- +5Vto3V3
- VRxtoGPIO8
- VRytoGPIO18
- SWtoGPIO17
- 2
Turn on the internal pull-up on GPIO17 in your code.
- 3
Plug in the USB cable last.
Arduino pins
Use these pins in your sketch.
const int KY_023_VRX = 8;
const int KY_023_VRY = 18;
const int KY_023_SW = 17;
void setup() {
pinMode(KY_023_SW, INPUT_PULLUP);
}
void loop() {
}
Some board drawings are from Wokwi and Seeed Studio.