As being the joystick is moved, the potentiometers’ resistance improvements, causing varying voltage levels which might be read through by a microcontroller or other processing unit. 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 https://daltonypkce.blogzet.com/joystick-controller-no-further-a-mystery-52884803