As it's analog, You will need two analog reading through pins with your microcontroller to determine X and Y. Getting an extra digital enter will Permit you to study the switch. This code reads the analog values from a joystick's X and Y pins, converts them into corresponding voltage values, https://arcade-joystick34319.designi1.com/58863755/5-easy-facts-about-analog-joystick-described