Mini maestro start/stop button for sequence

How can i program the maestro for following project, its a bit like a dancing musicplayer object,

Button A starts a sequence loop and also the forward button from a mp3 player -> a song is playing and the musicplayer object is dancing , i want button B to stop the sequence an return to the beginning for the next song.

Hello.

For the first part of your project (if you have not already completed it), I suggest looking at the “Example Scripts” section of the Maestro Servo Controller User’s Guide. You can find various script examples, particularly the “Using a button or switch to control servos” sub-section, that can help you get started.

The second half of your project would be difficult to implement since the Maestro does not support interrupts on its inputs. You could use a separate microcontroller to detect the button push and send the "Restart Script at Subroutine " or “Stop Script” serial command to stop the current script. Alternatively, depending on the behavior you want and your setup, you could connect button B to the reset pin on the Maestro board. If you want your animated object to return to some default position after resetting the Maestro board, you can set the default positions for each channel under the “Channel Settings” tab in the Maestro Control Center and select “On startup: Goto” as the startup behavior.

If you run into problems while writing the script, please post what you have so far along with a more detailed explanation of how you want the script to work, and we might be able to offer additional suggestions.

- Amanda

Hello Amanda,

thank you, that should work for my project.

Is it possible for a “smooth” reset, like the moving wait command ?

If you are using a separate microcontroller (e.g. A-Star 32U4 boards), then yes, it should be possible to make smooth return motions when resetting your system. To do that, you can set the speed and acceleration settings for each servo channel before sending the channels their respective default positions. If you use the reset button method, then no. The Maestro’s “On startup” setting does not apply speed or acceleration limits. You can find that detail under the “Channel Settings” section in the Maestro user’s guide.

- Amanda

A post was split to a new topic: Pausing Maestro script