Hi,
I have one button which controls one servo and one potentiometer that controls 2 servos
The code I have can make the button work or I can make one servo work using the slide pot.
I’m getting myself really confused here and would really appreciate some help please.
begin
0 get_position #get the value of the input on channel 0
500 less_than if #if it is less than 500
4000 5 servo #move the servo on channel 0 to 1000us
1 get_position # get the value of the pot, 0-1023
4 times 4000 plus # scale it to 4000-8092, approximately 1-2 ms
3 servo # set servo 5 based to the value
endif
repeat
If I add another servo, 4 servo the mini maestro crashes.
If I remove the button part of the script the slide pot works with one servo.
I know I could use a y lead, but is there code I can use instead?
If I remove the potentiometer code the button part works.
Any help would be really gratefully received thanks,
Jon