2011年12月3日土曜日

ADK demokitのプロトコル

android -> accessory

-- msg[0] msg[1] msg[2]
LED1 RED 0x02 0x00 0 - 255
LED1 GREEN 0x02 0x01 0 - 255
LED1 BLUE 0x02 0x02 0 - 255
LED2 RED 0x02 0x03 0 - 255
LED2 GREEN 0x02 0x04 0 - 255
LED2 BLUE 0x02 0x05 0 - 255
LED3 RED 0x02 0x06 0 - 255
LED3 GREEN 0x02 0x07 0 - 255
SERVO1 0x02 0x10 0 - 255
SERVO2 0x02 0x11 0 - 255
SERVO3 0x02 0x12 0 - 255
RELAY1 0x03 0x00 0(Low), 1(High)
RELAY2 0x03 0x01 0(Low), 1(High)

accessory -> android

-- msg[0] msg[1] msg[2]
Button1 0x01 0x00 0, 1
Button2 0x01 0x01 0, 1
Button3 0x01 0x02 0, 1
Button Joystick 0x01 0x04 0, 1
temperature 0x04 value of MSB value of LSB
light 0x05 value of MSB value of LSB
joystick 0x06 position of X(-128 - 127) position of Y(-128 - 127)
touch robot 0x01 0x03 0, 1