
|
A light sensor is a sensor that measures the amount of light that it sees. It reports the amount of light to the RCX as a number between 0 (total darkness) and 100 (very bright). |
![]() |
|
|
![]() |
The light sensor uses its own light source, a red Light Emitting Diode (LED), to illuminate a small area in front of its receiver. |
| The light sensor can determine if it is seeing a white piece of paper or a black piece of paper. When the light sensor is over the white paper, it reads a value of 50. When it is over the black paper, it reads a value of 33. |
| The light sensor detects light from a very wide angle. You can narrow its detection field by placing a 1x2 beam with a hole in front of the sensor. Now the light sensor will only detect light that is directly in front of it. | ![]() |
| Just for fun: Think of all the different things your robot could do if it had a light sensor. |
See also: Sensors, Programming: Light sensor