GoGo Protocol3
GoGo Protocol3
General Info:
• There are two header bytes of 0x54, 0xFE leading every command.
• Following the header bytes are command bytes. Most commands require only one command
byte. The table below tells you when the second byte is required.
• After sending each command, the GoGo board will respond by sending back an
acknowledgment header (0x55, 0xFF). Other bytes may follow as described in the Command
definition below.
Byte One:
Command Definition
CMD Description
000 Wakeup.
Parm0,1,2 and ext0,1 bits are combined to form a device ID to wake up.
ID 0 is always the local board
ID 1-31 are remote stations
Reply: Reply-Header (0x55, 0xFF) + Acknowledgment byte (0xAA)
001 Read sensor
Parameter bits: indicate which sensor to read
Extended bits: should always be 0.
Reply: Reply-Header (0x55, 0xFF) + sensor value high byte + sensor value low byte
010 Motor control
Parameter bits: identifies the operation
- 000 = ON
- 001 = OFF
- 010 = Reverse Motor Direction
- 011 = This way
- 100 = That way
- 101 = Coast
- 110 – 111 = Unassigned
Extended bits: should always be 0.
Reply: Reply-Header (0x55, 0xFF) + Acknowledgment byte (0xAA)
011 Set motor power
Parameter bits: define the power level (0-7).
Extended bits: should always be 0.
Reply: Reply-Header (0x55, 0xFF) + Acknowledgment byte (0xAA)
100 Talk to Motor
Command Length: 2 bytes
Parameter bits: should always be 0
Extended bits: should always be 0
Second byte: indicates which motor(s) to talk to.
Reply: Reply-Header (0x55, 0xFF) + Acknowledgment byte (0xAA)
101 Switch to burst mode.
Burst Mode will stream sensor data to the host to provide rapid sensor readings.
Example 1:
1010 0000, 0000 0010 will tell the GoGo board to stream sensor port2’s value in the
following format
Bits 5,6,7 of the high byte (underlined) is 001 indicating that this is sensor2’s value.
The actual sensor value is 01 0100 0100 = 324
Example 2:
1010 0000, 1001 0010 will tell the GoGo board to stream sensor port2, port5, port8’s
values in the burst cycle. Thus, one burst cycle will consist of 9 (3x3) bytes. An
example of a cycle could be:
Bits 5,6,7 of the second, fifth, and eighth byte are 001, 100, and 111 indicating that
they are sensor value of port 2, 5, and 8.
Their sensor values are 01 0100 0100, 00 0000 0010, and 10 0000 1001 accordingly.