Since it's analog, you'll need two analog reading through pins on your own microcontroller to determine X and Y. Having an additional electronic input will Permit you to study the switch. Observe that this example assumes you're using an Arduino-suitable board that supports the Joystick library, including the Arduino Leonardo https://emilioybbyv.idblogmaker.com/37007458/the-5-second-trick-for-gpadtester