Page 39 - Hacking Roomba
P. 39

20       Part I — Interfacing




                                 Dirt sensors (left, right)
                                 Wheel drop sensors (left, right, caster)

                                 Button press sensors (power, spot, clean, max)
                                 Infrared sensor (virtual wall, home base, and remote control functions)

                             Control

                             The Roomba also contains several actuators and annunciators that can be controlled through
                             the ROI:

                                 Drive-wheel motors
                                 Vacuum motor
                                 Main brush motor
                                 Side brush motor

                                 Status LEDs
                                 Piezoelectric beeper

                             Internal State

                             Additionally, the ROI makes available certain internal states of Roomba:

                                 Battery state and charge level
                                 Motor over-current
                                 Distance traveled
                                 Angle turned


                             What You Cannot Do
                             The ROI is simply an interface into the existing microcontroller program running in the
                             Roomba. It doesn’t bypass it. You cannot get direct access to the Roomba hardware. In general
                             this isn’t a bad thing. Some of the sensor data is constructed or massaged by this program to be
                             easier to use. For example, the infrared detector on the top of the Roomba is a single sensor
                             that responds to the virtual wall unit and remote control, but the ROI provides different sensor
                             values for those functions. Roomba is parsing the infrared bit stream emitted by those devices
                             and presenting the result as multiple binary values. It is not possible to parse custom infrared
                             bit streams, so detecting commands from other remote controls cannot be done. Most disap-
                             pointingly, it doesn’t provide a sensor interface to the charging dock beacon of the home base
                             beyond telling Roomba to go into “force-seeking dock” mode.
                             Beyond access to those data massaging routines, the ROI doesn’t provide any access to the vari-
                             ous cleaning algorithms used by the Roomba. But that doesn’t mean new ones can’t be created
                             and commanded through the ROI.
   34   35   36   37   38   39   40   41   42   43   44