#include <Servo.h>
Servo ATL1;
Servo ATL2;
Servo ATL3;
int pos = 0;
void setup() {
ATL1.attach(9);
ATL2.attach(10);
ATL3.attach(8);
}
void loop() {
for (pos = 0; pos <= 180; pos += 1) {
ATL1.write(pos);
ATL2.write(180-pos);
ATL3.write(pos*2);
delay(15);
}
for (pos = 180; pos >= 0; pos -= 1) {
ATL1.write(pos);
ATL2.write(180-pos);
ATL3.write(2*pos);
delay(15);
}
}