August 2010
Intermediate to advanced
288 pages
13h 21m
English
For the next part of the SoundMachine program, you’ll display the Tone Frequency and Volume values on the NXT’s screen. Displaying the values your program uses can be a big help when debugging. There is one small complication: The Tone Frequency and Volume values are numbers, and the Display block can print only text values.
To print a number, you first need to convert the number to text using the Number to Text block (in the Advanced group at the bottom of the Complete Palette, as shown in Figure 8-20 and Figure 8-21). The Number to Text block takes a number as input and outputs the equivalent text data. The input value is usually supplied using a data wire, although it can be set in the Configuration Panel (Figure 8-22 ...