Chapter 9. Sounds Received and Emitted

Introduction

The NXT brick can receive sound using a sound sensor, and emit sound using its loudspeaker. First we will look at some of the things that we can do with a received sound.

Sound is another way of communicating with a robot from a distance. The microphone in the sound sensor is better at picking up high-pitched signals, such as clapping or whistling, so we will confine ourselves to using this type of signal.

Start and Stop

As an illustration of what can be done with a sound signal, the program in Figure 9.1 makes a mobile robot start running upon hearing a sound, and stop running when it hears a second sound. Sometimes when the robot is running it will hear the sound of its own motors and ...

Get Programming Lego Mindstorms NXT 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.