This is JoyStick Module PS2 Breakout Sensor very similar to the ‘analog’ joysticks on PS2 (PlayStation 2) controllers. Directional movements are simply two potentiometers – one for each axis. Pots are ~10k each. This joystick also has a select button that is actuated when the joystick is press down.
With the help of this Joystick Module, you can measure position coordinates on the X and Y axis by moving the “hat”. It also contains a switch that is press-able by pushing the “hat”.It also contains a switch that is press-able by pushing the “hat” down. Similar to the XBOX controller.
The X and Y axes are two 10k potentiometers which control 2D movement by generating analog signals. When the module is in working mode, it will output two analog values, representing two directions. This module uses the 5V power supply, and value, when reading through analog input, would be about 2.5V, a value will increase with joystick movement and will go up till maximum 5V; the value will decrease when the joystick is moved in other direction till 0V.