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

the variable block

The Variable block, in the Data group on the Complete Palette (Figure 11-4), stores and retrieves variable values. The Variable block should appear in your program as shown in Figure 11-5.

The Variable block on the Complete Palette

Figure 11-4. The Variable block on the Complete Palette

The Variable block

Figure 11-5. The Variable block

When working with a Variable block, you need to tell NXT-G which variable to use and whether to read to or write from the variable. To do so, use the Configuration Panel (Figure 11-6) to select the variable from the list, and then set the Action item to either ...

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