Given that the joystick is moved, the potentiometers’ resistance adjustments, resulting in different voltage concentrations that may be read through by a microcontroller or other processing unit. Observe that this example assumes that you are making use of an Arduino-suitable board that supports the Joystick library, like the Arduino Leonardo https://dantekaobo.gynoblog.com/37001281/the-smart-trick-of-arcade-joystick-that-nobody-is-discussing