O'Reilly logo

Programming Lego Mindstorms NXT by Owen Bishop

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required