Script Help for Adding Buttons and Audio

You can change the behavior of Maestro channels on power up in the “Channel Settings” tab of the Maestro Control Center. For example, you can change the “On startup or error” option to “Go to” and set the target to something greater than 1500 so they default to a high signal when first powered. Alternatively, you could initialize them in your script (e.g. putting 8000 6 servo and 8000 7 servo at the top of your script before begin).

It is possible to have your sequence change slightly on each cycle (i.e. each button press), but doing so can increase the complexity of your script quickly. For example, one option is to use some sort of state variable for each button that keeps track of the number of times the button is pressed. Then, you can have your sequence check that to decide what to do. To do this with the Maestro scripting language, you can use the stack to hold your state variable(s). A simplified example script showing how to do this can be found in this thread. Another way to implement a state variable is to use a free Maestro channel as a dummy servo channel, in which case you could use that servo channel’s target position to store your state.

Brandon