I have attached an Adafruit Circuit Playground Express to my Roomba OI, and after manually waking it up I am able to successfully send opcode commands based on the Roomba OI Manual. I can even start, stop the OI and send the off op code, then restart with the RBC on LOW and get things going again.
Where things stop working is when I don't send any commands for more than 5 minutes and it enters sleep mode. I've seen a few questions on the board, but no definitive answers on how to successfully pulse the BRC from sleep so that I can begin to send commands to the OI. For my use case the need to start up could be random (could be hours between commands or days) so pulsing within 5 minutes off or on the dock to keep the OI alive seems excessive, but maybe that's what I have to do. It also seems like this means if the Roomba ever did enter sleep mode that human intervention would be the only way to get the OI started again. Has anybody had success waking the Create 2 or 600 series Roomba from sleep via the OI BRC?
Additional code, docs, pictures here
roomba.ino
//Setup pins
const int baudPin = A1;
//Setup roomba opcodes
//https://www.irobotweb.com/-/media/MainSite/PDFs/About/STEM/Create/iRobot_Roomba_600_Open_Interface_Spec.pdf?la=en
const int startOpCode = 128;
const int cleanOpCode = 135;
const int stopOpCode = 173;
const int powerOpCode = 133;
const int safeModeOpcode = 131;
const int fullModeOpcode = 132;
void setup() {
pinMode(baudPin, OUTPUT);
Serial1.begin(115200);
}
void loop() {
digitalWrite(baudPin, LOW);
delay(500);
digitalWrite(baudPin, HIGH);
delay(500);
digitalWrite(baudPin, LOW);
Serial1.write(startOpCode);
Serial1.write(safeModeOpcode);
Serial1.write(cleanOpCode);
delay(4000);
Serial1.write(powerOpCode);
Serial1.write(stopOpCode);
exit(0);
}
```