hi
I am using the maestro 6 channel controller.
I would like to use the rotation servo to move a sliding door, and I would like to add a limit switch at the end and at the beginning to limit the servo from going further.
I tried to implement the script examples at your page but the functionality it achieved is not what I am looking for.
I would like the door to open then stop by the limit switch, then close and get stopped by the limit switch again.
the limit switch I am using is the normally closed NC and the common with the 10k um resistor.
I tried to modify the scrept that I took from the examples you have in the website, I did some modidifcations, now this modification, I can stop the rotational servo when I click the button, but then I need to trigger the reverese direction movement when I click the other button, since I am using two buttons.
begin
button_a if sequence_a endif
repeat
sub button_a
0 get_position 500 less_than
return
sub sequence_a
10000 2 servo 10 delay
0000 2 servo 10 delay
return
thank you