User Manual

Servo, LED, and other output commands
command
stack
effect
description
SPEED -2
sets the speed of the channel specified by the top element to the
value in the second element (see Section 4.b)
ACCELERATION -2
sets the acceleration of the channel specified by the top element
to the value in the second element (see Section 4.b)
GET_POSITION -1,+1 gets the position of the channel specified by the top element
GET_MOVING_STATE +1
true if any servos that are limited by speed or acceleration settings
are still moving
SERVO -2
sets the target of the channel specified by the top element to the
value in the second element, in units of 0.25 μs
SERVO_8BIT -2
sets the target of the channel specified by the top element to the
value in the second element, which should be a value from 0 to
254 (see the Mini SSC command in Section 5.e)
LED_ON none turns the red LED on
LED_OFF none turns the red LED off (assuming no errors bits are set)
PWM -2
(Mini Maestro 12, 18, and 24 only) enables the PWM output
channel, with the period specified by the top element and the on
time specified by the second element, both in units of 1/48 μs (see
Section 4.a for more information about PWM)
SERIAL_SEND_BYTE -1
(Mini Maestro 12, 18, and 24 only) removes the top number from
the stack, interprets it as a single byte, and sends that byte to the
TTL serial output (TX)
6.c. Example Scripts
Getting started: blinking an LED
The following script will cause the red LED on the Maestro to blink once per second:
Pololu Maestro Servo Controller User’s Guide © 2001–2019 Pololu Corporation
6. The Maestro Scripting Language Page 77 of 102