Recently I have bought my first maestro servo controller and i would really like to make a script that will execute a servo sequence after button press has been released. I have started with the example scripts from the user guide just to see what each command does and how everything works. But every time i think i figured something an error shows and forces more questions. Ive looked through whole forum on related topics but couldnt find right fix. Down below is what I have started with. It is also giving me overflow error.
sub button 1 get_position 500 less_than sub wait_for_button_press wait_for_button_open_10ms wait_for_button_closed_10ms return sub wait_for_button_open_10ms begin button if drop get_ms else get_ms over minus 10 greater_than if drop return endif endif goto main_loop repeat sub wait_for_button_closed_10ms get_ms begin button if get_ms over minus 10 greater_than if drop return endif else drop get_ms endif repeat main_loop: begin 4000 frame 5000 frame 6000 frame 7000 frame 8000 frame repeat sub frame wait_for_button_press 5 servo return quit
I know that this is not the code that i need but like i said i wanted to see how script affects maestro.
On my maestro switch is on 1 and servo is on 5. All i wanted is to move to servo in position after set time delay.
I also wanted to ask if 2c 7.4V 350mah lipo battery would be sufficient to run maestro and one micro 7g servo with next to none load on servo.
Thank you so much for your time and i hope to hear from you soon