Moving a servo using a push button on a Maestro 12

This is the first time I have tried to use a Pololu Maestro 12 and I am having a hard time figuringit out. This should be simple enough to do, but for the life of me, I am missing something. What I am trying to do is to move 8 servos from the netural position of 6000 to the max position of 8000 and then back to the netural position of 6000 by pushing on push button.

I tried using the code that is in the manual and I can see it work on the screen except the the sevo moves from the netural position to the max position and stays there until I press the button again. I don’t want to have to press the button again to get it to go back to netrual.

This script will be loaded onto the Maestro 12 so that it can run by itself without it being connected to the USB port of a computer or via RS232.

Any Help would be appericated.

Dan

Hello.

Yes, this is simple. Assuming your script is based on our “Using a button or switch to control servos” example script, try changing your main loop to just be something like:

begin
  wait_for_button_press
  8000 0 servo
  1000 delay
  6000 0 servo
repeat

–David