Product User’s Manual – ShieldPS2
6.3 All PS2 Button and Joystick Status
Send (decimal)
Response from PS2
Description
31
6 bytes of data:
1st byte: digital button group 1
2nd byte: digital button group 2
3rd byte: Right Joystick X axis
4th byte: Right Joystick Y axis
5th byte: Left Joystick X axis
6th byte: Left Joystick Y axis
ShieldPS2 will return the status of all
digital and analog joystick of PS2
Digital group 1:
bit 7 (MSB): Left button
bit 6: Down button
bit 5: Right button
bit 4: Up button
bit 3: Start button
bit 2: Right Joystick Center button
bit 1: Left Joystick Center button
bit 0 (LSB): Select button
Digital group 2:
bit 7 (MSB): Square button
bit 6: Cross button
bit 5: Circle button
bit 4: Triangle button
bit 3: R1 button
bit 2: L1 button
bit 1: R2 button
bit 0 (LSB): L2 button
0
if the button is pressed
1
if button is not pressed
Example:
If microcontroller sent
31
(decimal),
ShieldPS2 will check all the button and
joystick status and return 6 bytes to
microcontroller.
Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved
18