understanding data types

Before you finish the SoundMachine program, you need to learn about one more aspect of data wires. So far, all the data you have worked with (the Ultrasonic and Rotation Sensor readings and the Power, Volume, and Tone Frequency settings) has been numbers. But numbers aren’t the only type of information. Think about the answers to the following three questions:

  1. What is your name?

  2. How old are you?

  3. Are you the oldest child in your family?

Each question asks for a different kind of information. Your name is a word, your age is a number, and the answer to the third question is either “yes” or “no.” In computer programming, the term data types describes different kinds of information. Your answers to the previous three questions ...

Get The Art of LEGO MINDSTORMS NXT-G Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.