This is PS2 wireless joystick that I have bought from ebay.com. Today, I want to show how to connect this joystick with the Arduino board. Actually, there have no other electronic components for interfacing between them, just 6 jumper wires and Arduino board.
the connection for the joystick.
Connection wires (green led will stop blinking when it connected)
White (datapin) --> pin D2
Grey (commandPin) --> pin D3
Blue (ground) --> Gnd
Purple (power) --> 5V
Green (attentionPin) --> pin D4
Black (clockPin) --> pin D5
However, this module have their own library. Please download from this link
Run an example that given in that library, change the pin number based on the selected pin above, upload and DONE!
When you press one button in joystick and hold it, it will give you the different number continuously. After you release it, the number back to zero (0). You can check it from Serial monitor.