Arm Link Reference

The Arm Control library, firmware, and software will allow you to control InterbotiX arms by sending an absolute value to each coordinate.

Arm Control Packet Structure

The Command Console will send a ten byte packet every 33ms. This packet includes the following data

Packet # Packet Info
1 Fixed Header - 0xff
2 X-Axis Coordinate High Byte
3 X-Axis Coordinate Low Byte
4 Y-Axis Coordinate High Byte
5 Y-Axis Coordinate Low Byte
6 Z-Axis Coordinate High Byte
7 Z-Axis Coordinate Low Byte
8 Wrist Angle High Byte
9 Wrist Angle Low Byte
10 Wrist Rotate High Byte
11 Wrist Rotate Low Byte
12 Gripper High Byte
13 Gripper Low Byte
14 Delta Value Byte
15 Button Byte
16 Extended Instruction Byte
17 Checksum

High byte/LowByte structure

  • Combine the two bytes to make a coordinate for each parameter. Parameters will be limited by each arm

Button Byte Structure

The button byte contains the current state of up to 8 buttons. Bit # 8 7 6 5 4 3 2 1 Button LT RT L6 L5 L4 R3 R2 R1

Examples
Hex Decimal Binary Buttons Active
0x00 0 00000000 none
0x01 1 00000001 R1
0x02 2 00000010 R2
0x03 3 00000011 R1,R2
0x0f 15 00001111 R1,R2,R3,L4

Extended Byte Structure

  • The extended instruction byte is currently not used for any built in functionailty
  • The extended instruction byte can be used by the user to pass information to the
  • Future versions of the ArbotiX Commander firmware will support requesting data from the Arm
Hex Decimal Action
0x00 - 0x10 0-16 No Action
0x20 32 Change Mode to 3D Cartesian / Straight Wrist & Go to Home
0x28 40 Change Mode to 3D Cartesian / 90 ° Wrist & Go to Home
0x30 48 Change Mode to 3D Cylindrical / Straight Wrist & Go to Home
0x38 56 Change Mode to 3D Cylindrical / 90 ° Wrist & Go to Home
0x40 64 Change Mode to Back Hoe / Joint Control & Go to Home
0x50 80 Move to Home / Straight Wrist in Current Mode
0x50 88 Move to Home / 90° Wrist in Current Mode (N/A for Back Hoe Mode)
0x60 96 Change Mode to Sleep
0x70 112 ID Packet Request
0x80 128 IK Status Reqeust (Not Implemented)
0xC8 200 Request Analog Packet on Analog 0
0xC9 201 Request Analog Packet on Analog 1
0xCA 202 Request Analog Packet on Analog 2
0xCB 203 Request Analog Packet on Analog 3
0xCC 204 Request Analog Packet on Analog 4
0xCD 205 Request Analog Packet on Analog 5
0xCE 206 Request Analog Packet on Analog 6
0xCF 207 Request Analog Packet on Analog 7

Checksum

The checksum can be calculated as follows:

  • Add up the first 16 bytes (not including the header)
  • Isolate the low-byte of the sum
  • Invert the byte

The Arduino Code for this operation would be

checksum=(char)(255 - (xValBytes[1]+xValBytes[0]+yValBytes[1]+yValBytes[0]+zValBytes[1]+zValBytes[0]+wristAngleValBytes[1]+wristAngleValBytes[0]+wristRotValBytes[1]+wristRotValBytes[0]+gripperValBytes[1]+gripperValBytes[0]+deltaValBytes[0] + buttonByte+extValBytes[0])%256);