User`s manual

ROBOT . HEAD to TOE
Product User’s Manual – SKPS
Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved
21
7.2 ASCII Mode (PC)
7.2.1 Button and PS2 Controller Status
Send 2
byte
Button of Controller Description
up up button
dw down button
lf left button
rg right button
tr triangle button
cr circle button
sq cross button
ci square button
st start button
se select button
jl left joystick center button
jr right joystick center button
l1 L1 button
l2 L2 button
r1 R1 button
r2 R2 button
SKPS will return the status of corresponding
button when the particular ASCII value is
received
‘0’ if the button is pressed
‘1’ if button is not pressed
Example:
If microcontroller sent ‘r2’ (ASCII), SKPS will
check R2 button status on PS2 Controller. SKPS
will return
‘0’ if R2 button is pressed or
‘1’ if R2 is not pressed.
[“Enter” after every result]
lx left joystick x-axis
ly left joystick y-axis
rx right joystick x-axis
ry right joystick y-axis
SKPS will return the particular value of
corresponding joystick in the selected axis
(3 byte, in ASCII).
Example: ‘235’or ‘029’.
[“Enter” after every result]
lu left joystick up value
ld left joystick down value
ll left joystick left value
lr left joystick right value
ru right joystick up value
rd right joystick down value
rl right joystick left value
rr right joystick right value
SKPS will return the particular value of
corresponding joystick in the selected axis
(3 byte, in ASCII).
Example: ‘039’or ‘027’.
[“Enter” after every result]
cs
SKPS will read controller status
‘1’ is return if controller is detected
unknown SKPS will return ‘x’ if unknown data is sent.