So I’m doing a robotic arm that has 4 servos. When I power on the breadboard and the arduino, the servos goes to a random position all of a sudden before starting the real code. I would like to remove this random positioning and I’m not sure how to do it.
This is the test code I’m using.
#include <Servo.h>
Servo servo1,servo2,servo3,servo4;
void setup () {
servo1.attach(9);
servo2.attach(8);
servo3.attach(7);
servo4.attach(6);
}
void loop () {
servo1.write(45);
delay(1000);
servo2.write(45);
delay(1000);
servo3.write(45);
delay(1000);
servo4.write(45);
delay(1000);
servo1.write(0);
delay(1000);
servo2.write(0);
delay(1000);
servo3.write(0);
delay(1000);
servo4.write(0);
delay(1000);
}