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

conclusion

NXT-G variables let you store the data that your program uses. Use the Edit Variables dialog to create variables, and use the Variable block to access the variables within your program. The programs presented in this chapter have shown you a few ways to use variables in your programs. Like data wires, variables add a lot of flexibility to the NXT-G language and are essential for solving many types of problems. You’ll see variables used in many of the programs in the coming chapters.

NXT-G 2.0 allows you to use constants in addition to variables. Constants make it more convenient to use values that don’t change, especially if you use them in many different programs.

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