Page 306 - Hacking Roomba
P. 306
Chapter 13 — Giving Roomba a New Brain and Senses 287
is done through the SV1 power switch. Move it to position 2-3 (toward the USB port) to
enable USB power and move it to position 1-2 (toward the external power input) to enable
external power. Figure 13-23 shows the SV1 switch in the external power position.
FIGURE 13-23: Switch SV1 in external power mode
The second issue is the serial port. The ATmega8 has a hardware serial port that can communi-
cate at the fast 57.6 kbps speed that Roomba speaks. However, this hardware serial port is used
by Arduino to load new programs. This means that you cannot have the USB cable hooked up
and getting debug information at the same time as you’re talking to the Roomba. You can use
any of the normal I/O pins as a software serial port the way the Basic Stamp does, but that has
the same speed problems as the Basic Stamp serial and in Arduino it’s currently not as elegant.
Since you’ll be using the same serial lines to load code into the board and control Roomba,
you’ll need to move a jumper. To switch from coding to running, the following steps should be
performed:
1. Upload the program to the Arduino board using Arduino IDE.
2. Unplug the Arduino board from the USB.