ice-files/utils/iroblib.c
void powerOnRobot(void) {
  // If Create's power is off, turn it on
  if(!RobotIsOn) {
    while(!RobotIsOn) {
      RobotPwrToggleLow;
      delayMs(500);  // Delay in this state
      RobotPwrToggleHigh;  // Low to high transition to toggle power
      delayMs(100);  // Delay in this state
      RobotPwrToggleLow;
    }
    delayMs(3500);  // Delay for startup
  }

  // Flush the buffer
  while( (UCSR0A & 0x80) && UDR0);
}
// Ensure that the robot is On.
Ensure that the robot is On.
Ensure that the robot is On .
void powerOnRobot(void) {
  if(!RobotIsOn) {
    while(!RobotIsOn) {
      RobotPwrToggleLow;
      delayMs(500);  
      RobotPwrToggleHigh;  
      delayMs(100);  
      RobotPwrToggleLow;
    }
    delayMs(3500);  
  }
  while( (UCSR0A & 0x80) && UDR0);
}
void powerOnRobot ( void ) { if ( ! RobotIsOn ) { while ( ! RobotIsOn ) { RobotPwrToggleLow ; delayMs ( 500 ) ; RobotPwrToggleHigh ; delayMs ( 100 ) ; RobotPwrToggleLow ; } delayMs ( 3500 ) ; } while ( ( UCSR0A & 0x80 ) && UDR0 ) ; }
Ensure that the robot is On.
Ensure that the robot is On .
// If Create's power is off, turn it on // Delay in this state // Low to high transition to toggle power // Delay in this state // Delay for startup // Flush the buffer