Servos don't move

I have read the manual and wired everything up like it says. Am using a 5V 12 amp regulated power supply and have it hooked to the power supply terminals on the Maestro 12 and have the blue jumper on the VIN and VSRV pins as I will be using one power supply and will not have it connected to a USB port.

The Program works as I have tested it in the control panel and is as follows: But when in stand alone not connected to the computer it will not move any servos. What am I missing here.

goto main_loop    # Run the main loop when the script starts (see below).
 
# This subroutine returns 1 if the button is pressed, 0 otherwise.
# To convert the input value (0-1023) to a digital value (0 or 1) representing
# the state of the button, we make a comparison to an arbitrary threshold (500).
# This subroutine puts a logical value of 1 or a 0 on the stack, depending
# on whether the button is pressed or not.
sub button
  0 get_position 500 less_than
  
  return
 
# This subroutine uses the BUTTON subroutine above to wait for a button press,
# including a small delay to eliminate noise or bounces on the input.
sub wait_for_button_press
  wait_for_button_open_10ms
  wait_for_button_closed_10ms
  
  return
 
# Wait for the button to be NOT pressed for at least 10 ms.
sub wait_for_button_open_10ms
  get_ms # put the current time on the stack
  begin
    # reset the time on the stack if it is pressed
    button
    if
      drop get_ms
    else
      get_ms over minus 10 greater_than
      if drop return endif
    endif
  repeat
 
# Wait for the button to be pressed for at least 10 ms.
sub wait_for_button_closed_10ms
  get_ms
  begin
    # reset the time on the stack if it is not pressed
    button
    if
      get_ms over minus 10 greater_than
      if drop return endif
    else
      drop get_ms
    endif
  repeat
 
main_loop:
   
 begin
  wait_for_button_closed_10ms
  6000 1 servo
  6000 2 servo   
  6000 3 servo
  6000 4 servo      
  6000 5 servo
  6000 6 servo
  6000 7 servo
  6000 8 servo

        
  wait_for_button_open_10ms
  8000 1 servo
  8000 2 servo   
  8000 3 servo
  8000 4 servo      
  8000 5 servo
  8000 6 servo
  8000 7 servo
  8000 8 servo
      
    repeat
          
  return

Dan S.

Hello, Dan.

Please put your code inside [code ] [/code ] tags (without the spaces) in the future to make it more readable.

Did you check the “Run script at startup” checkbox in the Script tab of the Maestro Control Center?

–David

No I don’t think I did that. I had it on before I got the code to work, but when I was getting errors I turned it off so I could stop the code from running in the control center. Does that have to be checked so the code will run when not connected to the USB port? This is a project for work, so I won’t be able to change it and test it until monday. Thanks for the heads up and tip.

Dan S.

Yes, you need to check that check box. --David

Thanks David: I will do that when I get back to work on Monday.

Dan