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 ...
Get The LEGO MINDSTORMS NXT 2.0 Discovery Book 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.