Since it's analog, You'll have two analog looking at pins on your own microcontroller to find out X and Y. Having an additional digital enter will Enable you to read through the switch. Note that this instance assumes you're using an Arduino-appropriate board that supports the Joystick library, including the https://analog-joystick59246.creacionblog.com/37932381/the-ultimate-guide-to-diy-arcade-parts