Arduino Function: RobotControl.isActionDone

Description

This method checks if the current motor board mode action is finished. Line-following mode will report an action completed signal when it reaches a finishing line (a perpendicular line).

Syntax

Robot.isActionDone()

Returns

 boolean

Examples

#include 
long timer;

void setup(){
 Robot.begin();
 Robot.beginLCD();
 delay(3000);

 Robot.setMode(MODE_LINE_FOLLOW);
 timer=millis();
 while(!Robot.isActionDone()){
   //pauses line-following for 3 seconds every 5 seconds
   if(millis()-timer>=5000){
     Robot.pauseMode(true);
     delay(3000);
     Robot.pauseMode(false);
     timer=millis();
   }
   Robot.debugPrint(millis());
 }
 Robot.text("Done!",0,10,true);
 while(true);
}
void loop(){
}


Based on the reference originally written by Arduino Community,  wiring.org.co and  arduino.cc