Since the joystick is moved, the potentiometers’ resistance alterations, resulting in different voltage stages that can be read by a microcontroller or other processing device. This code reads the analog values from a joystick's X and Y pins, converts them into corresponding voltage values, and prints them around the serial https://sethzrdpt.mybuzzblog.com/18014884/arcade-joystick-secrets