Uh-oh, it looks like your Internet Explorer is out of date.

For a better shopping experience, please upgrade now.

Dave Baum's Definitive Guide to LEGO MINDSTORMS

Dave Baum's Definitive Guide to LEGO MINDSTORMS

by Dave Baum, R. Zurcher (Illustrator), D. Baum (Illustrator)
The author of this book is the developer of a custom programming language called NQC (Not Quite C). NQC has become widely popular among sophisticated LEGO MINDSTORMS users and is compatible with MAC or PC. Unlike other books on the market, this book focuses specifically on construction techniques and the step-by-step process of building and programming robots. Baum


The author of this book is the developer of a custom programming language called NQC (Not Quite C). NQC has become widely popular among sophisticated LEGO MINDSTORMS users and is compatible with MAC or PC. Unlike other books on the market, this book focuses specifically on construction techniques and the step-by-step process of building and programming robots. Baum takes the reader through the entire process of building and programming MINDSTORMS( robots using both LEGO'S RCX code and his own code (NQC). The book includes high quality graphics and over 14 sample robots to build.

Editorial Reviews

LEGO blocks, and LEGO MINDSTORMS, like model trains, belong to that special category of children's toy that is more often taken over by Dad. Dave Baum's text, written for the adult beginner (with or without attendant child) delivers information on several robot projects and programmable automatons, all built with the durable plastic blocks. The MINDSTORM set contains blocks and a special RCX brick, which forms the interface between operator and robot; Baum's book outlines all the hobbyist needs to know regarding the building and maintenance of these robots. Numerous illustrations and sidebars containing technical details complete the volume; also included are snippets of code (both the RCX and the author's own language) for programming the MINDSTORMS. If you have purchased, either for yourself or for your child, a MINDSTORMS kit, you'll wish to have this text and its companion CD-ROM.

Fatbrain.com reviewed this book and the publisher's summary, and found that the summary accurately reflects the book's contents.

Related Titles:

For more on robotics, particularly for the do-it-yourselfer, be certain to check out Robots, Androids, and Animatrons: 12 Incredible Projects You Can Build and The Robot Builder's Bonanza: 99 Inexpensive Robotics Projects. More technical and less tactile treatments of robotics include Mobile Robots: Inspiration to Implementation and Robot: Mere Machine to Transcendent Mind. For cutting edge research, see Recent Advances In Robot Learning.

Reviewed by JR - March 20, 2000

From the Publisher
"... will prime your creative thought processes as you begin to design your own Mindstorms robots. It's a great introduction to Mindstorms for kids and grownups alike." (David Wall in amazon.com) "It's very readable with a decent selection of robot plans, plus a CD-ROM holding Baum's own NQC compiler in Windows, MacOS and Linux forms, plus a demo version of RoboLab." (DEMON)

Product Details

Publication date:
Technology in Action Series
Product dimensions:
7.52(w) x 9.25(h) x 0.04(d)

Read an Excerpt

Chapter 1: Getting Started

Welcome to Dave Baum's Definitive Guide to LEGO MINDSTORMS. This book represents a journey through the exciting world of LEGO MINDSTORMS. We'll start slowly at first, introducing basic concepts and techniques, then proceed to constructing and programming a number of different robots. By the end of the book, you will be well prepared to build your own robotic creations.

if you haven't yet played with your LEGO MINDSTORMS Robotics Invention System, you should take a few moments now to open it up, read through the Quick Start card, and take care of the mundane tasks such as installing batteries and hooking up a serial cable. More detailed information on these tasks can be found in the first few chapters of the User Guide supplied with the set.

This chapter introduces the RCX (the brains inside a MINDSTORMS robot) and the programming environments featured in this book. A simple test program will be created, then downloaded and run on the RCX. This test program serves as a convenient way of controlling a motor for some of the examples in subsequent chapters.

This chapter assumes that the infrared (IR) transmitter-included in the LEGO MINDSTORMS set-is already hooked up to your computer, and that batteries are installed in both the IR transmitter and the RCX itself. When communicating, the IR transmitter and the RCX should face one another, about 6"apart. Communication can be adversely affected by direct sunlight or other bright lights. If communication between the IR transmitter and the RCX is unreliable, try adjusting the position of the RCX and shielding it from unwanted light.

Programming Environments

Programs for the Rcx are created on a personal computer (called the host computer), then downloaded to the RCX. The RCX can then run these programs on its own without further intervention from the host computer. There are a number of different programming environments that can be used to create RCX programs. The software included with the Robotics Invention System can be used to write programs in RCX Code, which is an easy-to-use, graphical programming environment. Although limited in functionality, RCX Code does provide a friendly, intuitive way for beginners to start programming the RCX.

Not Quite C (NQC) is a more traditional, text-based computer language that can also be used to program the RCX. Versions of NQC for Windows, MacOS, and Linux are provided on the accompanying CD-ROM. NQC takes a little longer to learn, but it provides much more power than RCX Code.

RCX Code and NQC are the two languages featured in this book. Sample code is usually provided for both languages, although in some of the more complex cases only an NQC example is possible. Descriptions of some other programming environments can be found in Appendix C.

The original version of the Robotics Invention System was set #9719. Recently, an updated version called Robotics invention System 1.5 has been introduced (#9747). There are several differences between these two versions. The 1.5 version comes with updated software, new instructions, and a slightly different mixture of LEGO pieces. owners of the original version can upgrade to the 1.5 version. See Appendix A for more information.

For the most part, the material in this book applies to both the original and 1.5 version of the Robotics Invention System. There are, however, a few exceptions.

  • Two of the projects require pieces from the original set that are not present in the 1.5 set. Further information on obtaining these parts can be found in appendix B.
  • The appearance of several of the RCX Code blocks has changed in 1.5. The book uses 1.0-style blocks for illustrating RCX Code programs, so programs written with 1.5 software will look slightly different (although they will behave the same). The most significant changes occur in my commands, which are explained in chapter 7.
  • Several limitations for RCX Code programs have been removed in 1.5. Most notably, stack controllers may be nested and my commands can call one another. This is explained further in chapter 7.
  • The RCX in the 1.5 set cannot be powered from an external AC adapter.
The next few sections will guide you through the installation and use of NQC. If you wish to use RCX Code instead, you can skip to the section titled RCX Code Quick Start later in this chapter.

When the RCX is powered up for the first time, a special piece of software called firmware must be downloaded to the RCX. This firmware provides a sort of operating system for running your own programs. if you write programs in RCX Code, the firmware will automatically be downloaded whenever it is needed. If you use NQC, you must download the firmware manually. If the RCX's display looks like the illustration below, firmware has not yet been downloaded. once it is loaded, the RCX will remember the firmware even when it is turned off.

The firmware itself is on the Robotics invention System CD-ROM (not this book's CD-ROM) in a folder named FIRM. The name of the file depends on its version number. As of this writing, the current firmware file is FIRM0309.LGO; however, it is conceivable that a newer firmware version will be on future CDs. Check your own CD or use the latest file in the FIRM directory. There are actually several different NQC programming tools, and each of them has differ_ ent ways of downloading firmware. Details are provided in the Using RcxCC, Using MacNQC, and Using NQC for Windows sections below.

NQC Quick Start

NQC is a textual computer language. Programs are written in an editor, then compiled and downloaded to the RCX. The NQC compiler is primarily available as a command line tool. This means that it must be invoked by typing the proper commands into a command shell (such as the MS-DOS Prompt for Windows 95/98). Integrated Development Environments (IDEs), which provide a program editor and a graphical user interface to the NQC compiler, exist on some platforms. RcxCC is one such IDE that runs under Microsoft Windows, and MacNQC is a Macintosh-based IDE (both are included on the accompanying CD-ROM). IDEs make using NQC a bit easier and more friendly, and they are, in general, the preferred solution where available. One important point, however, is that all of these solutions use the exact same language to specify an NQC program. For example, a program written with RcxCC can also be used with the Linux version of the NQC compiler. Quick Start information is provided for three different versions of NQC: RcxCC, MacNQC, and NQC for Windows.

Using MAC RcxCC relies on one of the software components normally installed by the RCX Code software. For this reason, it is advisable to install the RCX Code software prior to using RcxCC. Refer to the Robotics Invention System User Guide for more information on installing this software.

RcxCC has its own folder within the Tools folder of the CDROM. To install RcxCC, run the Setup.exe program found within the RcxCC folder. After installation, an RCX Command Center folder will be added within the Start menu's Programs folder.

When you launch RcxCC it will display a dialog box that allows you to specify which serial port the IR transmitter is connected to. You can either select the appropriate COM port or let RcxCC automatically check each port and decide for itself. The dialog box also allows you to choose between Mindstorms; and CyberMaster. Assuming that you are using an RCX, you may leave this item set to Mindstorms. Make sure the RCX is turned on and facing the IR transmitter, then click the OK button.

if RcxCC has trouble communicating with the RCX it will display an error and let you try again. If you click Cancel, RcxCC will still start, but those functions that require communication with the RCX (such as downloading a program) will be disabled.

Once started, RcxCC will show two windows: the main window and a floating templates window. The templates window is a sort of cheat sheet for remembering the various NQC commands. For our present example we can ignore it.....

Meet the Author

Dave Baum is the creator of Not Quite C (NQC) a powerful language for programming MINDSTORMS™ robots that has been widely accepted by advanced users. As the creator of NQC, he is uniquely able to teach his readers how to use the language. Not only does Dave Baum provide help with programming MINDSTORMS™ robots, he also explains how to build the robots with construction techniques and introductory robotics theory.

Customer Reviews

Average Review:

Post to your social network


Most Helpful Customer Reviews

See all customer reviews