I have a a DFrobot Arduino and i want the motors to to run within a certain amount of time so i put it in a for loop but the loop never stops. How can i make it to stop?
int E1 = 5; //M1 Speed Control
int E2 = 6; //M2 Speed Control
int M1 = 4; //M1 Direction Control
int M2 = 7; //M1 Direction Control
void setup(){
int i;
for(i=0;i<=9;i++)
{
analogWrite (E1,100); //PWM Speed Control
digitalWrite(M1,HIGH);
analogWrite (E2,100);
digitalWrite(M2,HIGH);
}
}
void loop(){
}