Need Help. How switch to next Sequence?

I,m from Austria and New in this Forum.
Sorry for my Bad English :blush:

I Used Maestro 12 Channel Servo Controller for Big Scale Helicopter.
4 Servos should be move from 1 Switch.
Press Switch_ Servo 1 Move in Position.
Press Switch next Servo 2 Move in Position
Press Switch next Servo 3 Move in Position
Press Switch next Servo 4 Move in Position.
Press Switch Next all Servo move in Return Position.
end of Program
Switch is Position 6 on Controller


Do you have your switch functioning properly when you monitor it in the “Status” tab of the Maestro Control Center? If not, I recommend connecting it as described in the “Attaching Servos and Peripherals” section of the Maestro user’s guide.

Once your switch is functioning, I would suggest looking at the “Using a button or switch to control servos” example found in the “Example Scripts” section of the same user’s guide. The script in that example uses a wait_for_button_press subroutine that sounds like what you want to do between calling each of your subroutines. If you use the same subroutines, but modified to use the channel your switch is connected to, your main loop would probably look something like:


If you try updating your code to use the subroutines from the “Using a button or switch to control servos” example, and run into problems or questions, you can post your updated code here, and I would be glad to take a look.


Please Help.
Where is the Problem-???
Using Button on Channel 6

It looks like you did not import all of the subroutines from the “Using a button or switch to control servos” example that I mentioned in my previous post. You will need to copy all of the subroutines (i.e. button, wait_for_button_press, wait_for_button_open_10ms, and wait_for_button_closed_10ms) to get wait_for_button_press to work

Also, please note that when you call the subroutine in your BEGIN/REPEAT loop, you should not have sub before it (sub should only be included when defining a subroutine).


The whole thing is very hard for me . Since I hardly English spoken.Ich have to program the switch program from the User Guide Adapted and my servo motion .
Servo 1 and 2. button on channel . 6
However, getting the after button press . A stack underflow / overflow .
Servo 1 moves only 1 time .

A stack underflow error happens when there are not enough values on the stack for the command that was called. A stack overflow error happens when a value is added to the stack when it is already full.

Unfortunately, I can only see half of your code from the picture you posted, so I cannot offer any suggestions for fixing it. Could you post your Maestro settings file instead? You can save the settings file for your Maestro by selecting the “Save settings file…” option within the “File” drop-down menu of the Maestro Control Center.