Since it's analog, you'll need two analog looking through pins on the microcontroller to determine X and Y. Getting an additional digital input will Permit you to read through the change. Note that this instance assumes you're employing an Arduino-compatible board that supports the Joystick library, like the Arduino Leonardo https://cristianqgtgr.blogars.com/36756145/the-ultimate-guide-to-diy-arcade-parts