Because the joystick is moved, the potentiometers’ resistance adjustments, resulting in different voltage degrees that could be examine by a microcontroller or other processing unit. This code reads the analog values from the joystick's X and Y pins, converts them into corresponding voltage values, and prints them over the serial https://joystick-controller00874.blogzet.com/the-best-side-of-analog-joystick-52885521