August 2010
Intermediate to advanced
288 pages
13h 21m
English
As you write more programs, you may find that you use some values repeatedly. A value that doesn’t change is called a constant. For example, the number of degrees needed to spin the TriBot in a full circle is a constant. The value doesn’t change, as long as you don’t change the way the robot is built. You can use this value in any program that spins the robot all the way around, and by adding a Math block, you can easily spin the TriBot halfway around, as in the ThereAndBack program from Chapter 4; or you can have the TriBot make a quarter turn, as in the WallFollower program from Chapter 7. Some other constants you might find useful ...
Read now
Unlock full access