
To control the Power LED, you must send two data bytes to Roomba: "color" and "intensity".
#ROBOTC ARDUINO CODE#
If you want a "FULL MODE", the code should be sent instead. To start Roomba always 2 codes must be sent: "START" and the mode, in our case "SAFE MODE". We can "wake-up" it, sending a Low pulse to Mini-DIN pin 5 (detect device input) as shown on function below: void wakeUp (void) The first thing that must be done when programming a Roomba is to: The above diagram shows how the Arduino should be connected to Roomba Mini-DIN connector Roomba will communicate at 19200 baud until the processor loses battery power or the baud rate is explicitly changed by way of the OI. Each pulse should last between 50 and 500 milliseconds. After turning on Roomba, wait 2 seconds and then pulse the Baud Rate Change low three times. Use the Baud Rate Change pin (pin 5 on the Mini-DIN connector) to change Roomba’s baud rate.Roomba will communicate at 19,200 baud until the processor loses battery power or the baud rate is explicitly changed by way of the OI. After about 10 seconds, Roomba plays a tune of descending pitches. While powering off Roomba, continue to hold down the Clean/Power button after the light has turned off.There are 2 ways to set Roomba baud rate: By default, Roomba communicates at 115,200 baud, but in order to communicate with Arduino, we will switch it to 19,200.
#ROBOTC ARDUINO SERIAL#
Gives you complete control over Roomba, all of its actuators, and all of the safety-related conditions that are restricted when the OI is in Safe mode, as Full mode shuts off the cliff, wheel-drop and internal charger safety features.įor communication between the Roomba and Arduino, the Serial Port will be used.Should one of the above safety-related conditions occur while the OI is in Safe mode, Roomba stops all motors and reverts to the Passive mode.Detection of a cliff while moving forward (or moving backward with a small turning radius, less than one robot radius).


Detection of a wheel drop (on any wheel).Safe Mode: Gives you full control of Roomba, with the exception of the following safety-related conditions:

When the OI is in Passive mode, you can request and receive sensor data using any of the sensor commands, but you cannot change the current command parameters for the actuators (motors, speaker, lights, low side drivers, digital outputs) to something else.
