Chapter 6. Using the Light Sensor

Introduction

The light sensor is the most useful of the NXT's sensors. As seen in Figure 6.1, the sensor comprises two LEDs. One is the actual sensor, a photodiode, which receives light and is used to measure its intensity. The other is an ordinary LED, which illuminates a surface so the first LED can measure the amount of light being reflected from it.

Figure 6.1. The light sensor showing the photodiode (top) and the illuminating LED (bottom).

The icon (see Figure 6.2) has a “light” symbol to identify it, and the bar across the icon is yellow. The icon exhibits a smaller light symbol if the LED is switched ...

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.