Arduino Function: RobotControl.pauseMode

Description

This method pauses or resumes the mode-specific action for the bottom board. For line-following mode, the robot will stop following the line, but will still receive commands.

Syntax

Robot.pauseMode(onOff)

Parameters

onOff: boolean *true pauses the mode *false resumes it.

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