Page 316 - Hacking Roomba
P. 316
Putting Linux chapter
on Roomba
dding a microcontroller to Roomba is the small step that enables a
near infinity of capabilities. The microcontrollers are cheap and
Apower-conscious and hint at a world we’ll soon be in, full of objects
imbued with simple, ubiquitous intelligence. But their very design limits
their usefulness for the more complex tasks we might call upon for a robot.
in this chapter
One of the main differences between the programs run on a microcontroller
and those run on a PC (be it Windows, Linux, or Mac OS X) is the inabil- Understand
ity to run multiple programs concurrently. That is, the microcontrollers
you’ve used so far don’t have an operating system: a master program that embedded Linux
abstracts the hardware with software libraries, allows multiple programs to
run at once, and protects programs from one another. There are some real- Pick the right
time executive programs for some microcontrollers, which provide a degree embedded Linux
of hardware abstraction and multitasking, but these are no better than system
DOS compared to Windows.
The tiny microcontrollers considered in Chapter 13 have small RAM and Install and configure
ROM footprints (on the order of several kilobytes), obviating the ability OpenWrt
to run complex programs or store large amounts of data. There are a few
exceptions to this rule, with some having the ability to talk to large flash Control Roomba
ROM disks, but those are special cases and the code for such things eats from the command
up most of the precious memory space.
line
The smaller microcontrollers make it a snap to interface simple peripherals
like LEDs and buttons, but complex peripheral standards like hosting Control Roomba
Bluetooth or USB are out of reach. Interfacing something as seemingly from Perl
simple as a USB mouse is not possible with small microcontrollers.
Between the tiny microcontroller chips and the large motherboards of mod- Make a battery pack
ern PCs lies a realm of embedded boards that are small yet have the same for your embedded
power as desktop PCs of a decade ago. With such power, these embedded Linux box
boards can run real preemptive multitasking operating systems. In the two
architectures presented in Chapter 13 (in Figure 13-1), these boards exist in
the middle: some memory and peripherals are on-board the processor, but
many are external.
This chapter focuses on using such an embedded board, with Linux as the
operating system running on it. Since you already have the ability to add a
processor and communicate through Wi-Fi, this new system should be able
to do at least that. And it goes without saying that it should be able to be
powered by Roomba.