Control Maestro Sequences from Arduino

Hi,

'Im new to using the Mini Maestro and wanted to know if there was a command within the Adrunio Library that will run a sequence that is saved to the Maestro when the Maestro is no longer tethered to the computer?

Something like:

void loop()
{
  buttonState1 = digitalRead(buttonPin1);
  if (buttonState1 == HIGH) {   
  maestro.runSequence(1);
  delay(4000);
if (buttonState2 == HIGH) {
  maestro.runSequence(2);
delay(4000);
maestro.runSequence(8);
  }

I’m just looking for something to run the preset animations that I designed while tethered to the computer. Any help would be great.

Thanks,

-Nick

Hello, Nick.

There is no function in the maestro-arduino library that executes a sequence on the Maestro, because there is no serial command that executes a sequence for the Maestro. However, you can copy your sequence to a script using the “Copy (all) Sequences to Script” button under the “Sequence” tab of the Maestro Control Center, then run the script using the restartScript function. After copying your sequence to the script, you will need to define the BEGIN/REPEAT block as a subroutine in order to run your sequence, like so:

sub start 		# Define start subroutine
  begin
    500 5612 0 0 0 0 0 
    0 0 0 0 0 0 
    0 0 0 0 0 0 frame_0..17 # Frame 0
    500 7021 frame_0 # Frame 1
    500 5475 frame_0 # Frame 2
  repeat

(The restartScript function sends the “Restart Script at Subroutine” serial command to the Maestro, which starts running the script at a location specified by the subroutine number. For more information about that command, see the “Serial Script Commands” section of the Maestro Servo Controller User’s Guide.)

- Amanda