#include <Servo.h>
Servo SecondMotor;
Servo MinuteMotor;
int i,j;
void setup() {
// attach servo motors
SecondMotor.attach(6);
MinuteMotor.attach(5);
// start at position 0
SecondMotor.write(0);
MinuteMotor.write(0);
}
void loop() {
// minute motor
for(i=0; i <= 180; i++){
// seconds motor sweep
for(j=0; j <= 180; j++){
SecondMotor.write(j);
delay(20);
}
// minute motor sweep
MinuteMotor.write(i);
}
}