![robotc arduino robotc arduino](https://image.made-in-china.com/2f0j00ZlsRIOPGHhoT/Acrylic-Robot-C-Programmable-IR-Sensor-Robot-Kit-for-Arduino.jpg)
void startSafe()Īs described at introduction, Roomba has 5 LEDs:
#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
![robotc arduino robotc arduino](https://www.vexforum.com/uploads/default/original/2X/f/f53ab25ef0fd848c882b0b2d9b54d8608ea33fbe.jpeg)
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.