user2186641
user2186641

Reputation: 11

iRobot Create not responding to commands

I'm using an arduino mega to control an iRobot Create I have been successful in changing modes and running the Create's demos via OI commands, but I can't get it to do anything specific, like driving or playing sounds. It simply doesn't respond to those commands.

int led=13;
  void setup()
  {
    pinMode(led, OUTPUT);  
  delay(2000);
  Serial.begin(57600);
  sendCom((byte[]){128,131}); // start-> full mode
  //sendCom((byte[]){136,0}); // this works, tells Create to play demo 0
  sendCom((byte[]){137,255,56,1,244}); // supposed to make Create drive backward, but doesn't do anything
  }
  void loop()
  {
    int _speed=1000;
    digitalWrite(led, HIGH);   
    delay(_speed);        
    digitalWrite(led, LOW);
    delay(_speed);
  }

  void sendCom(byte toSend[]){
      int length=sizeof(toSend)/sizeof(byte);
      for (int i=0;i<length;i++) Serial.write(toSend[i]);
      Serial.flush();
  }

Upvotes: 1

Views: 819

Answers (1)

user2461391
user2461391

Reputation: 1433

By sending 131, you are putting the robot into safe mode, not full mode. Send 132 to put it into full mode.

Safe mode may prevent the Create from driving if certain sensors detect it is unsafe to move.

Source: Create Open Interface manual

Upvotes: 1

Related Questions