How to stop loop


i have a dfrobot arduino , want motors to run within amount of time put in loop loop never stops.  how can make 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(){

}

read how blinky without delays work, use time of desired duration , stops being executed.


Arduino Forum > Forum 2005-2010 (read only) > Software > Syntax & Programs > How to stop loop


arduino

Comments

Popular posts from this blog

CAN'T INSTALL MAMBELFISH 1.5 FROM DIRECTORY - Joomla! Forum - community, help and support

error: expected initializer before 'void'

CPU load monitoring using GPIO and leds - Raspberry Pi Forums