using delay function to pause movement
i using built-in delay function temporarily pause couple motors. code after delay not implemented, if program freezes entirely. here code \/
void reverse(int x)
{
if (forwarddrive == true)
{
halt();
<-delay(400);---------------------------------------------------------->
}
controlrightfront(low,high,x);
controlrightrear(low,high,x);
controlleftfront(low,high,x);
controlleftrear(low,high,x);
}
void reverse(int x)
{
if (forwarddrive == true)
{
halt();
<-delay(400);---------------------------------------------------------->
}
controlrightfront(low,high,x);
controlrightrear(low,high,x);
controlleftfront(low,high,x);
controlleftrear(low,high,x);
}
that halt(); looks suspicious character when looking freeze suspects. what's do?
lefty
lefty
Arduino Forum > Forum 2005-2010 (read only) > Software > Syntax & Programs > using delay function to pause movement
arduino
Comments
Post a Comment