Thanks so much for the help. I did a little test run with two junk sub routines and it kept looping forever. Im totally new to this code, but I just applied a little thought and quickly noticed, that the button was going from 0-256 when open or closed. SO I changed the first line you gave me to less than 1 just to see what would happen. Now it runs one command with one press and the other command with a second press. As far as I can tell I just have to plug in the real positions and I’ll be done. Thanks so much again. Ill let you know if something else comes up. Let me know if you notice a flaw in my logic above.
Another Question(s).
IF I were to run a second button to do somethng else separately how could I let the program know the difference between the two buttons? A different strength resistor? a different range signal change to look for?
Also could you show me a basic on/ off command for LEd please. Thanks again 
**EDIT**
Ive only actually tested it by checking “run script on startup” in the script part of the program. I havent downloaded it to the Pololu yet. While Testing I noticed the Stack window on the side, it goes up to 31, and after 31 routines(basically it is filling up when I press the button) there is an error and I have to manually restart the device. Will this happen after downloading the commands to the Pololu as well? or is it just a part of the script program that Im misreading? I understand there is only so much memory in the chip, but im repeating the same two commands, I didnt think it would matter how often I press the button (maybe it doesnt??) is there a way to avoid this error? Like a command that resets upon error?
*DOUBLE EDIT*
I think Ive solved that issue, I had my delay after a frame at the bottom instead of after the actual subroutine for open_helmet. Ive fixed that and now the stack isnt growing at all no matter how often I press the button
1 #Sets an initial state (open)
begin
0 get_position
1 less_than #Check if button is pushed
if
dup
if #If helmet is open, run frame to close it
close_helmet #Run the close_helmet subroutine
drop #Change the state to 0
0
else #If helmet is closed, run frame to open it
open_helmet #Run the open_helmet subroutine
drop #Change the state to 1
1
endif
endif
repeat
### Sequence subroutines: ###
# close_helmet
sub close_helmet
500 0 0 0 7491 9033 frame_1..5 # Frame 0
500 4594 frame_4 # Frame 1
500 delay
return
# open_helmet
sub open_helmet
500 0 0 0 5984 7254 frame_1..5 # Frame 0
500 6659 frame_5 # Frame 1
500 6316 frame_4 # Frame 2
500 5686 frame_5 # Frame 3
500 6923 frame_4 # Frame 4
500 5091 frame_5 # Frame 5
500 7491 frame_4 # Frame 6
return
sub frame_1..5
5 servo
4 servo
3 servo
2 servo
1 servo
delay
return
sub frame_4
4 servo
delay
return
sub frame_5
5 servo
500 delay
return
