I am controlling several servos, and as a test I have a for loop (much like the Sweep example). My issue is that I have some servos mounted backwards (mirrored) so clockwise for one servo is counter clockwise for the other. Basically I am trying to get them to spin opposite directions when receiving the same position...
Hopefully this helps clarify:
servo1 position 0 = 0
servo2 position 0 = 180
My explanation may be a little confusing... I'm not really sure of the proper terminolgy for this type of thing.
void setup(){
servo1.attach(0);
servo2.attach(1); //this servo is mounted backwards
}
void loop(){
for(pos = 0; pos < 180; pos += 1){
servo1.write(pos);
servo2.write(pos); //pos needs flipped
delay(15);
}
for(pos = 180; pos>=1; pos-=1){
servo1.write(pos);
servo2.write(pos);//pos needs flipped
delay(15);
}
}