User Manual

254.
The Maestro responds to three sub-protocols:
Compact Protocol
This is the simpler and more compact of the two protocols; it is the protocol you should use if your
Maestro is the only device connected to your serial line. The Maestro compact protocol command
packet is simply:
command byte (with MSB set), any necessary data bytes
For example, if we want to set the target of servo 0 to 1500 µs, we could send the following byte
sequence:
in hex: 0x84, 0x00, 0x70, 0x2E
in decimal: 132, 0, 112, 46
The byte 0x84 is the Set Target command, the first data byte 0x00 is the servo number, and the last
two data bytes contain the target in units of quarter-microseconds.
Pololu Protocol
This protocol is compatible with the serial protocol used by our other serial motor and servo controllers.
As such, you can daisy-chain a Maestro on a single serial line along with our other serial controllers
(including additional Maestros) and, using this protocol, send commands specifically to the desired
Maestro without confusing the other devices on the line.
To use the Pololu protocol, you transmit 0xAA (170 in decimal) as the first (command) byte, followed
by a Device Number data byte. The default Device Number for the Maestro is 12, but this is a
configuration parameter you can change. Any Maestro on the line whose device number matches
the specified device number accepts the command that follows; all other Pololu devices ignore the
command. The remaining bytes in the command packet are the same as the compact protocol
command packet you would send, with one key difference: the compact protocol command byte is now
a data byte for the command 0xAA and hence must have its most significant bit cleared. Therefore,
the command packet is:
0xAA, device number byte, command byte with MSB cleared, any necessary data
bytes
For example, if we want to set the target of servo 0 to 1500 µs for a Maestro with device number 12,
Pololu Maestro Servo Controller User’s Guide © 2001–2017 Pololu Corporation
5. Serial Interface Page 50 of 99