Multi-Servo rotation

Hello I am trying to make multiple servo motors rotate from 0 to 90 degrees at the same time. I am using a motor shield which enables me to rotate multiple ones from an external power source so no problems getting them to rotate. My issue is that the current code I am using enables all the motors to rotate but one after the other. I want them to rotate in unison. Could someone please help me figure out how to write a code which enables all the motors to rotate at the same time?

#include <Servo.h>

Servo myservo1;
Servo myservo2;
Servo myservo3;
Servo myservo4;

void setup()
{
myservo1.attach(0);
myservo2.attach(2);
myservo3.attach(4);
myservo4.attach(6);
}

void loop()
{
myservo1.write(0);
delay(1000);

myservo1.write(90);
delay(1000);

myservo2.write(0);
delay(1000);

myservo2.write(90);
delay(1000);

myservo3.write(0);
delay(1000);

myservo3.write(90);
delay(1000);

myservo4.write(0);
delay(1000);

myservo4.write(90);
delay(1000);
}

Yup, you’ve got delay. What you’ve written says move servo 1 to 0, go into a coma for a second, then move servo 1 to 90, then go into a coma for a second…

Look at the “Blink Without Delay” example for some inspiration on how to handle timing without using delay.

Put your write(90)s together, then a delay, then the write(0)s together, then a delay.