Telerobotics Senior Project Webbot 1.0 - Robot Control System (c) 2000 Bradley University ECE --------------------------------- Robot command set General format -------------- 7 6 5 4 3 2 1 0 --------------- s o o o d d d d Bits: 7 Start byte flag 6-4 Opcode for a specific command 3-0 Data for command specified by the opcode Opcodes: 0 Movement 1 Status check 2 Tag check 3 Reserved 4 Extended command - not implemented 5 Configuration check - not implemented 6 Configuration set - not implemented 7 ADC test Movement commands ----------------- Format: 7 6 5 4 3 2 1 0 --------------- 1 0 0 0 d d a a Bits: 7 Start byte - always a one-byte command 6-4 Opcode - 0 3-2 Direction: 00 - Forward 01 - Reverse 10 - Left 11 - Right 0-1 Amount of movement: fwd, rev: lft, rgt 2 inches 20 degrees 4 inches 45 degrees 6 inches 90 degrees 8 inches 90 degrees Commands: $80 Move forward 2 inches $81 Move forward 4 inches $82 Move forward 6 inches $83 Move forward 8 inches $84 Move reverse 2 inches $85 Move reverse 4 inches $86 Move reverse 6 inches $87 Move reverse 8 inches $88 Turn left 20 degrees $89 Turn left 45 degrees $8a Turn left 90 degrees $8b Turn left 90 degrees $8c Turn right 20 degrees $8d Turn right 45 degrees $8e Turn right 90 degrees $8f Turn right 90 degrees Return value: None Status check ------------ Format: 7 6 5 4 3 2 1 0 --------------- 1 0 0 1 d d d d Bits: 7 Start byte - always a one-byte command 6-4 Opcode - 1 3-0 Status byte: 0 Movement status 1-15 Reserved Commands: $90 Check status byte 0 $91-$9f Reserved Return value: Always returns 1 byte, the value of the status byte. Tag check --------- Format: 7 6 5 4 3 2 1 0 --------------- 1 0 1 0 x x x x Bits: 7 Start byte - always a one-byte command 6-4 Opcode - 2 3-0 Not used Commands: $a0-$af Check for a tag Return value: Always returns 1 byte. 0 indicates no tag. Any other value is a tag. The value will be the sampled value of the tagging sensor. Extended command ---------------- Format: 7 6 5 4 3 2 1 0 --------------- 1 1 0 0 x x x x Bits: 7 Start byte - always a one-byte command 6-4 Opcode - 4 3-0 Reserved Commands: - not implemented $c0-$cf Reserved Return value: - not implemented Configuration check ------------------- Format: 7 6 5 4 3 2 1 0 --------------- 1 1 0 1 x x x x Bits: 7 Start byte - always a one-byte command 6-4 Opcode - 5 3-0 Reserved Commands: - not implemented $c0-$cf Reserved Return value: - not implemented Configuration set ----------------- Format: 7 6 5 4 3 2 1 0 --------------- 1 1 1 0 x x x x Bits: 7 Start byte - always a one-byte command 6-4 Opcode - 6 3-0 Reserved Commands: - not implemented $c0-$cf Reserved Return value: - not implemented ADC test -------- Format: 7 6 5 4 3 2 1 0 --------------- 1 1 1 1 d d d d Bits: 7 Start byte - always a one-byte command 6-4 Opcode - 7 3-0 ADC channel: 0 PE0 1 PE1 2 PE2 3 PE3 4 PE4 5 PE5 6 PE6 7 PE7 8-11 Reserved 12 Vrh 13 Vrl 14 Vrh/2 15 Reserved Commands: $f0 Check PE0 $f1 Check PE1 $f2 Check PE2 $f3 Check PE3 $f4 Check PE4 $f5 Check PE5 $f6 Check PE6 $f7 Check PE7 $f8-fb Reserved $fc Check Vrh $fd Check Vrl $fe Check Vrh/2 $ff Reserved Return value: Always returns 1 byte, the sampled value of the specified analog channel.