Command
byte
Command
Data
bytes
Response
bytes
Description
0x81
signature
0
6
Sends the slave name and code version, e.g.
“3pi1.0”. This command also sets motor
speeds to 0 and stops PID line following,
if active, so it is useful as an initialization
command.
0x86
raw sensors
0
10
Reads all five IR sensors and sends the raw
values as a sequence of two-byte ints, in the
range 0-2000
0x87
calibrated sensors
0
10
Reads all five IR sensors and sends
calibrated values as a sequence of two-byte
ints, in the range 0-1000
0xB0
trimpot
0
2
Sends the voltage output of the trimpot as a
two-byte int, in the range 0-1023
0xB1
battery millivolts
0
2
Sends the battery voltage of the 3pi in mV, as
a two-byte int
0xB3
play music
2-101 0
Plays a tune specified by a string of musical
commands. The first data byte specifies the
length of the following string (max length
100), so that the slave program knows how
many more data bytes to read. See the
play()
command in
of the
for
a
description of the musical command format.
0xB4
calibrate
0
10
Performs one round of calibration on the
sensors, reads all five IR sensors, and sends
calibrated values as a sequence of two-byte
ints, in the range 0-1000. This should be
called multiple times, as the robot moves
over a range from white to black.
0xB5
reset calibration
0
0
Resets the calibration. This should always be
used when connecting to a slave, in case
the master reset without a slave reset, for
example in case of a power glitch.
Pololu 3pi Robot User’s Guide
© 2001–2019 Pololu Corporation
10. Expansion Information
Page 64 of 85
Содержание 0J5840
Страница 24: ...Pololu 3pi Robot User s Guide 2001 2019 Pololu Corporation 5 How Your 3pi Works Page 24 of 85...
Страница 67: ...Source code Pololu 3pi Robot User s Guide 2001 2019 Pololu Corporation 10 Expansion Information Page 67 of 85...
Страница 77: ...Source code Pololu 3pi Robot User s Guide 2001 2019 Pololu Corporation 10 Expansion Information Page 77 of 85...