Page 442 - Hacking Roomba
P. 442
Appendix C — iRobot Roomba Open Interface (ROI) Specification 423
iRobot® Roomba® Open Interface (ROI) Specification
Roomba Open Interface Cliff Front Right
Packet subset: 1
Sensor Packets Range: 0 – 1
The robot will send back one of four different sensor data Data type: 1 byte, unsigned
packets in response to a Sensor command, depending on the
value of the packet code data byte. The data bytes are specified The state of the cliff sensor on the front right side of Roomba is
below in the order in which they will be sent. A packet code value sent as a 1 bit value (0 = no cliff, 1 = cliff)
of 0 sends all of the data bytes. A value of 1 through 3 sends a
subset of the sensor data. Some of the sensor data values are Cliff Right
16 bit values. These values are sent as two bytes, high Packet subset: 1
byte first.
Range: 0 – 1
Sensor Packet Sizes
Data type: 1 byte, unsigned
Packet code Packet Size
The state of the cliff sensor on the right side of Roomba is sent
0 26 bytes
as a 1 bit value (0 = no cliff, 1 = cliff)
1 10 bytes
2 6 bytes
Virtual Wall
3 10 bytes
Packet subset: 1
Bumps Wheeldrops Range: 0 – 1
Packet subset: 1 Data type: 1 byte, unsigned
Range: 0 - 31 The state of the virtual wall detector is sent as a 1 bit value (0 =
no virtual wall detected, 1 = virtual wall detected)
Data type: 1 byte, unsigned
The state of the bump (0 = no bump, 1 = bump) and wheeldrop Motor Overcurrents
sensors (0 = wheel up, 1 = wheel dropped) are sent as individual
bits. Packet subset: 1
Range: 0 – 31
Bit 7 6 5 4 3 2 1 0
Sensor n/a n/a n/a Wheeldrop Bump The state of the five motors’ overcurrent sensors are sent as
Caster Left Right Left Right individual bits (0 = no overcurrent, 1 = overcurrent).
Note: Some robots do not report the three wheel drops separately. Instead, Bit 7 6 5 4 3 2 1 0
if any of the three wheels drops, all three wheel-drop bits will be set. You Motor n/a n/a n/a Drive Drive Main Vacuum Side
can tell which kind of robot you have by examining the serial number Left Right Brush Brush
inside the battery compartment. Wheel drops are separate only if there is
an “E” in the serial number.
Dirt Detector Left
Wall Packet subset: 1
Packet subset: 1 Range: 0 - 255
Range: 0 – 1 Data type: 1 byte, unsigned
Data type: 1 byte, unsigned The current dirt detection level of the left side dirt detector
is sent as a one byte value. A value of 0 indicates no dirt is
The state of the wall sensor is sent as a 1 bit value (0 = no wall,
1 = wall seen). detected. Higher values indicate higher levels of dirt detected.
Dirt Detector Right
Cliff Left
Packet subset: 1
Packet subset: 1
Range: 0 – 255
Range: 0 – 1
Data type: 1 byte, unsigned
Data type: 1 byte, unsigned
The current dirt detection level of the right side dirt detector
The state of the cliff sensor on the left side of Roomba is sent
as a 1 bit value (0 = no cliff, 1 = cliff). is sent as a one byte value. A value of 0 indicates no dirt is
detected. Higher values indicate higher levels of dirt detected.
Cliff Front Left Note: Some robots don’t have a right dirt detector. You can tell by removing
the brushes. The dirt detectors are metallic disks. For robots with no right
Packet subset: 1
dirt detector this byte is always 0.
Range: 0 – 1
Data type: 1 byte, unsigned
The state of the cliff sensor on the front left side of Roomba is
sent as a 1 bit value (0 = no cliff, 1 = cliff).
7 www.irobot.com