As it's analog, You will need two analog looking through pins on the microcontroller to find out X and Y. Acquiring an extra digital input will let you study the swap. Observe that this example assumes you will be utilizing an Arduino-compatible board that supports the Joystick library, such as https://jeremyc543dgl5.wikitelevisions.com/user