Skip to Main Content
The Art of LEGO MINDSTORMS NXT-G Programming
book

The Art of LEGO MINDSTORMS NXT-G Programming

by Terry Griffin
August 2010
Intermediate to advanced content levelIntermediate to advanced
288 pages
13h 21m
English
No Starch Press
Content preview from The Art of LEGO MINDSTORMS NXT-G Programming

BumperBot with sound

In this section, you’ll create the BumperBotWithSound program by modifying the BumperBot program so that the TriBot waits for you to clap before it starts moving.

To make the program wait for you to clap, you need to add a Wait Sound block before the Loop block. When you drag the new block to the left of the Loop block, the Loop block will shift to the right to make room, as shown in Figure 5-16. It takes some practice to get used to the way the IDE shifts the program around as you are dragging a block. Be sure not to move the block too fast and to pause for a second before dropping the block to make sure you have it in the right spot.

Figure 5-16. Inserting the Wait Sound block

Even after you have been doing this for a while, ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

The Art of LEGO MINDSTORMS EV3 Programming (Full Color)

The Art of LEGO MINDSTORMS EV3 Programming (Full Color)

Terry Griffin

Publisher Resources

ISBN: 9781593272180Errata