O'Reilly logo

The LEGO MINDSTORMS NXT 2.0 Discovery Book by Laurens Valk

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

7

using the touch, color, and rotation sensors

Chapter 6 showed you how to use the Ultrasonic Sensor, together with the Wait, Loop, and Switch blocks, to make your robot interact with its environment. In this chapter, you’ll learn how to use the Touch, Color, and Rotation Sensors, as well as the NXT buttons. You’ll use these sensors to allow the Discovery robot to avoid walls with bumpers, follow a line, play different sounds based on sensor readings, and even tell you which color its sensor detects. Once you’ve finished this chapter, you’ll be ready to build two cool robots that use sensors in their own way in Chapters 8 and 9.

You’ll begin by upgrading Discovery with a dual bumper attachment that use two Touch Sensors, as shown in Figure 7-1 ...

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