User Manual

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).
Number of subroutines: This is the number of different subroutines you are allowed to have.
The first 128 subroutines defined in your script are special: these subroutines can be started using a
serial or native USB command, and each call from within your script requires only one byte of script
space. The Micro Maestro only supports having up to 128 subroutines. The Mini Maestro 12, 18,
and 24 support having an unlimited number of subroutines, but the subroutines defined after the first
128 can not be started from a serial or native USB command, and each call requires 3 bytes of script
space.
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–2019 Pololu Corporation
6. The Maestro Scripting Language Page 89 of 102