
ARCOS
38
Use the integer argument value of zero to flush the contents of the respective buffer. Otherwise, use an argument
value of up to 253 bytes to have ARCOS wait to collect the requested number of incoming AUX-port serial bytes and
them send them in the respective
SERAUXpac
,
SERAUX2pac, or SERAUX3pac
SIP.
E
NCODERS
Table 10. ENCODERpac SIP contents
L
ABEL
D
ATA
D
ESCRIPTION
Header
integer
Exactly 0xFA, 0xFB
Byte Count
byte
Number of data bytes + 2 (checksum)
Type
byte
0x90
Left Encoder
integer
Least significant, most significant portion of the
integer
current accumulated encoder counts from the left wheel
Right Encoder
integer
Least significant, most significant portion of the
integer
current accumulated encoder counts from the right wheel
Checksum
integer
Checksum for packet integrity
Issue the
ENCODER
command #19 with an argument of one for a single or with an argument value of two or more for a
continuous stream of
ENCODERpac
(type 144; 0x90) SIPs. Discontinue the packets with the
ENCODER
command #19
with an argument of zero.
B
UZZER
S
OUNDS
Pioneer 3 robots have a piezo buzzer on the User Control Panel that aurally notifies you of system conditions, such as
low batteries or stalls. For stealthy operation, issue the
SOUNTOG
command #92 with an argument of zero to mute the
microcontroller’s buzzer or argument of one to re-enable it. (See also the
SOUNDTOG
FLASH parameter in the next
chapter to set its default state.)
The SAY command #15 lets you play your own sounds through the buzzer. The argument consists of a length-specified
string of duration and tone pair bytes. The duration is measured in 20 millisecond increments.
A tone value of zero means silence (musical rest). The next 127 frequencies (1-127) are the corresponding MIDI notes.
The remaining tones are frequencies computed as:
Tone – 127 * 32
equivalent frequencies from 1 to 4096, in 32 Hz increments.
Except for the MIDI notes, you’ll just have to experiment with tones. Here is the sequence that generates the ARCOS
distress wail when the robot stalls or the batteries are low:
50,100,20,0,50,60,0
Table 11. System-related buzzer sounds
Condition
Buzzer Sound
Start up
one-time trill
Start client
connection one-time trill
Close client
connection one-time trill
Low battery
repetitive beep