You MUST describe what you EXPECT to happen, and what ACTUALLY happened. Then others will know what error it is you are having. Your description does not even say if it is a compiler error you are getting, or if something is smoking.
void leg1() {
servo4.write(90);
servo4.write(0); // you write 90 to servo4 then right away write 0 with no time for the servo to react
delay(2000);
servo2.write(90);
servo2.write(80); // same here for servo2
delay(1000);
servo4.write(90);
servo2.write(90);
}
The delays seem to be in the wrong place.
Once you get the servos working the way you want with delays, study the "blink without delay" example in the IDE. Blink without delay works for all kinds of timing problems, not just LEDs.
servo4.write(90);
servo4.write(0); // you write 90 to servo4 then right away write 0 with no time for the servo to react
delay(2000);
servo2.write(90);
servo2.write(80); // same here for servo2
delay(1000);
servo4.write(90);
servo2.write(90);
}
The delays seem to be in the wrong place.
Once you get the servos working the way you want with delays, study the "blink without delay" example in the IDE. Blink without delay works for all kinds of timing problems, not just LEDs.
i tried this code with 4 leg spider and was working fine...