web search result for arduino joy stick shows it to have
2 potentiometers to give you analoge control of the X & Y position
and a n/o switch operated when you push the joy stick down

https://www.best-microcontroller-pro...-joystick.html