User Manual
Note that we use 0 to set the output low and 8000 to set the output high. These are reasonable
choices, but any value from 0 to 5999 could be used for low, and anything from 6000 to 32767 could
be used for high, if desired.
Serial output (Mini Maestro 12, 18, and 24 only)
On the Mini Maestro 12, 18, and 24, a script can be used to send serial data out on the TTL-level serial
port (TX). This means that the Maestro can control additional Maestros, allowing for large numbers
of channels without a separate microcontroller. Here is a simple program that shows how a serial
command can be used to control another Maestro. To use this code, configure both Maestros in UART
mode at the same baud rate, and connect TX on the master to RX on the slave.
6.d. Script Specifications
The user scripting language available on the Mini Maestros is more powerful than that available on the
Micro Maestro. The differences are summarized in the table below.
Micro Maestro Mini Maestro 12, 18, and 24
Script size: 1KB 8 KB
Stack size: 32 126
Call stack size: 10 126
Number of subroutines: 128 unlimited
Extra commands: PEEK, POKE, PWM, SERIAL_SEND_BYTE
Script size: This is the number of bytes of persistent memory that can be used to store your code. A
bigger script size allows you to store more servo motion frames and to write more complex programs.
Stack size: This is the maximum number of values that can be on the stack at the same time. A bigger
stack allows you to have more variables, do bigger computations, and worry less about whether the
stack will overflow.
Call stack size: This is the maximum subroutine nesting depth (the maximum number of subroutines
that can be called without returning).
1
2
3
4
5
6
7
8
9
10
100 delay # initial delay to make sure that the other maestro has time to initialize
begin
127 0 mini_ssc # set servo 0 to position 127, using the mini-SSC command
254 0 mini_ssc # set servo 0 to position 254
repeat
sub mini_ssc
0xFF serial_send_byte serial_send_byte serial_send_byte
return
?
Pololu Maestro Servo Controller User’s Guide © 2001–2017 Pololu Corporation
6. The Maestro Scripting Language Page 86 of 99










