Hi there, I’m attempting to control 5 x SG90 servos with the following test code:
Servo myservo0;
Servo myservo1;
Servo myservo2;
Servo myservo3;
Servo myservo4;
void setup() {
}
void loop() {
myservo0.attach(A0); myservo0.write(0); delay(1000); myservo0.detach();
myservo1.attach(A1); myservo1.write(0); delay(1000); myservo1.detach();
myservo2.attach(A2); myservo2.write(0); delay(1000); myservo2.detach();
myservo3.attach(A3); myservo3.write(0); delay(1000); myservo3.detach();
myservo4.attach(A4); myservo4.write(0); delay(1000); myservo4.detach();
myservo0.attach(A0); myservo0.write(180); delay(1000); myservo0.detach();
myservo1.attach(A1); myservo1.write(180); delay(1000); myservo1.detach();
myservo2.attach(A2); myservo2.write(180); delay(1000); myservo2.detach();
myservo3.attach(A3); myservo3.write(180); delay(1000); myservo3.detach();
myservo4.attach(A4); myservo4.write(180); delay(1000); myservo4.detach();
delay(5000);
}
The problem I have is that only one servo ever responds (the last in series on pin A4). I’m guessing I’m missing something fundamental here but my searches are coming up empty.
Thank you.

