the sound sensor

The Sound Sensor (shown in Figure 5-14) lets your robot respond to sounds, at least in a very simple way. This sensor is included in the original NXT retail kit and the education set. The NXT 2.0 retail kit includes a second Touch Sensor instead of a Sound Sensor.

When working with any sensor, it’s important to understand exactly what the sensor is measuring. When we hear a sound, we can discern many characteristics including differences in loudness and pitch. We can even identify different musical instruments by the different sounds they make. The Sound Sensor, however, is much less sophisticated than our ears; it measures only the loudness of a sound.

When you use the Sound Sensor, it will report the loudness of a sound as a number ...

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.