August 2010
Intermediate to advanced
288 pages
13h 21m
English
The previous three chapters explored using data wires to move data between blocks in your program. Although this ability can be very useful, for some problems you need to do more than just move data around. Often you’ll need to tuck the information away and use it later in your program.
When you need to store information for later use, use a variable. In this chapter, I’ll show you how to use variables and the types of problems they can help you solve.
Think of a variable as a place in the NXT’s memory where you can store a value. The programs in this chapter will show you several ways that you can use variables in your programs.
The first example program in this chapter is a modified version of the RedOrBlue ...