Make 3 servos move like a wave
The easiest way is to define how many degrees you want to move totally .

In your case it is 180 steps (from 90 to 180, which is 90 steps, and 180 to 90, which is another 90 steps).

Than use a for loop with a 180 step-counter and make 3 simple formulas to map the 180 possible degrees to the wanted servo position.

So the first formula will look like (step 0..90 -> move from 90 to 180, step 90..180-> move 180 to 0).

int calcServo1(int step)
{
    if (step &lt; 90)
    {
        return 90 + step;
    }
    else
    {
        return 270 - step; // 180 - (step - 90);
    }
}


For the second it should be:


step is 0..45: first iteration: 90, otherwise 135..90
step is 45..135: 90..180
step is 135..180: 180..135


The code will be something like:

int calcServoPos2(int iteration, int step)
{ 
    if (step &lt; 45)
    {
        if (iteration == 0)
        {
            return 90;
        }
        else
        {
            return 135 - step;
        }
   else if (step &lt; 135)
   {
         return step + 45;
   }
   else
   {
       return step - 45; //  step - 180 + 135
   }   
}


Servo 3 I will leave up to you.

From your main loop you call the positions:

 int iteration = 0;

 while (loop)
 {
      for (int step = 0; step &lt; 180; step++)
      {
         int servo1pos = CalcServo1(iteration, step);
         servo1.write(servo1pos);

         int servo2pos = CalcServo2(iteration, step);
         servo2.write(servo2pos);

         int servo3pos = CalcServo2(iteration, step);
         servo3.write(servo3pos);

         delay(mid);
     }
     iteration++;
  }