As it's analog, You will need two analog looking through pins on your microcontroller to determine X and Y. Getting an extra electronic input will Permit you to read the swap. You will find a Unique map, known as "Mouse Pointer" which transforms the unit into a mouse cursor pointer. https://analogjoystick80098.ivasdesign.com/59235346/how-much-you-need-to-expect-you-ll-pay-for-a-good-analog-stick