Script for door

Hi all, maybe some one can help me.
I need simple script for open small door when i push button and close the door after for exmp 15 sec.

Hello.

Could you please specify which product you are inquiring about? If you are asking about the Maestro, the “Using a button or switch to control servos” example script in the Maestro Servo Controller User’s Guide might help you get started.

- Jeremy

Thanks i see that page. But realy i don’t use befo Maestro. And so i have some problem with create normal work script.
I need script with next rules: when i push button (button conncet to analog input) my servo go to second pozition (i found this poz by experiment) and after 10 ces for exmp go to first pozition. I have controler with 12 channel, so i use 6 channel for input and 6 channel for output.
I try use next script:
begin
sub button_0
0 get_position 500 less_than
return
But this script don’t work :frowning:

If you have the Maestro controller, I suggest that you read and work through the set of examples in the link that Jeremy posted above. Get some LEDs to blink before you try to control a servo!

After you have worked through those examples, you should see why your script doesn’t work – but here is a hint: it doesn’t do anything.

Thanks for help!
I have small problem. I use next script

begin

button_a if sequence_a endif

button_b if sequence_b endif
repeat
sub button_a
0 get_position 600 GREATER_THAN
return

sub button_b
2 get_position 800 GREATER_THAN
return

sub sequence_a
40 1 speed
32000 1 servo 5000 delay
10 1 servo 1000 delay
return

sub sequence_b
40 3 speed
32000 3 servo 5000 delay
10 3 servo 1000 delay
return

But some times when i close 0 input i see that wors 3 servo and also problem i close 2 input work 1 servo. Maybe some one know about this problem and know how to solve.

I am a little confused on what you mean by " wors 3 servo and also problem i close 2 input work 1 servo". Could you please elaborate?

- Jeremy