Because it's analog, you'll need two analog reading through pins on the microcontroller to find out X and Y. Possessing an additional digital input will Enable you to read the switch. Note that this instance assumes you might be using an Arduino-compatible board that supports the Joystick library, like the https://robertd228vxu4.nico-wiki.com/user