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

synchronizing two sequence beams

You can control when a second Sequence Beam starts by choosing where to start drawing the Sequence Beam. In some programs, you may want to also make the task on one Sequence Beam pause until the task on the other Sequence Beam completes. The following are two ways to accomplish this.

the AroundTheBlock program

In the AroundTheBlock program (see Figure 17-2), you may want to stop updating the display after the TriBot has completed moving around the square. Instead of having the Loop block run forever, you can use a variable to control when the loop stops. Figure 17-13 shows a modified version of the AroundTheBlock program that uses a logic variable named Done to control the Loop block. The variable is set to false ...

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