Product User’s Manual – ShieldPS2
6. PROTOCOL
By default, ShieldPS2 is in passive condition, where it waits for command from UART. If Arduino
main board sends a command, it will response based on the command and the status of PS2 button
and joystick. The command is simple, it is in value. Each value will request ShieldPS2 to check the
particular button or joystick status on PS2 and response.
6.1 PS2 Button and Joystick Status
Send
(decimal)
Button on PS2
Description
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Select button
left joystick centre button
right joystick centre button
START button
up button
right button
down button
left button
L2 button
R2 button
L1 button
R1 button
triangle button
circle button
cross button
square button
Applied to value 0 to 15 (decimal):
ShieldPS2 will return the status of corresponding
button when the particular decimal value is
received
0
if the button is pressed
1
if button is not pressed
Example:
If main board sent 10 (decimal), ShieldPS2 will
check L1 button status on PS2 Controller.
ShieldPS2 will return:
0
if L1 button is pressed or
1
if L1 is not pressed.
16
17
18
19
20
left joystick xaxis
left joystick yaxis
right joystick xaxis
right joystick yaxis
left joystick up value
Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved
16