Page 129 - The Unofficial Guide to Lego Mindstorms Robots
P. 129
118
Figure 6-1.
pbFORTH software architecture
F orth is an interpreted language, which means you can type commands to pbFORTH and have the robot respond immediately.
You don't have to compile and download programs; you simply type them directly to the interpreter.
Installing pbFORTH
Installing pbFORTH is a simple process:
1. Obtain pbFORTH from http://www.hempeldesigngroup.com/lego/pbFORTH/ . It's available as an archive that contains the
pbFORTH replacement firmware, the source code, and example scripts.
2. Install pbFORTH on the RCX. To do this, you'll need a firmware downloader. The firmware downloader is a piece of
software that knows how to transmit firmware over the IR link to the RCX. Two freely available firmware downloaders are
nqc (described in Chapter 4) and firmdl, available in C source code at http://graphics.stanford.edu/~kekoa/rcx/tools.html
.Downloading firmware to the RCX takes a couple of minutes, so be prepared to wait.
To download pbFORTH using nqc, for example, you use the -firmware option, like this:
nqc -firmware pbforth.srec
When the download is complete, your RCX's screen will go entirely blank. Although the RCX looks dead, don't be fooled.
pbFORTH is running, and you will be able to talk to it as described in the next section.
pbFORTH will remain running on your RCX as long as the batteries are good. It replaces the regular MINDSTORMS
firmware entirely, so you won't be able to program with RCX Code or NQC wit hout reinstalling the regular firmware. To
remove