About the light sensor The light sensor can detect changes in light levels. It converts raw values read by the sensor to percentages.  Its values can range from 0 to 100. The RCX will register 100 when a bright light is shined directly at the sensor. Ambient room light is around the 50s, and a dark closet is around the 20s. Many factors affect the light sensor, including the RCX batteries (as they get older, programs may need adjustments to light ranges previously used), ambient light, and interference from an IR tower. Therefore, it happens that a program using a light sensor may work perfectly well one day and not at all the next. Practically, that means that the light ranges set in a program may need to be adjusted.               

Sensor Watcher

                

© The LEGO Group

    A light sensor can be set to detect a brighter or darker light reading, a blink, or any range between 0 and 100.

 

Stack Decision Makers

                     

© The LEGO Group

A light sensor can be set to detect a brighter or darker light reading, or any range between 0 and 100.

The Wait Until and Repeat Until can also detect a blink.

                                                                 

You can check the reading of a light sensor using the View button on the RCX. The numbers displayed range from 0 to 100, where lower numbers represent areas that are darker than those represented by higher numbers.

 

Important Note: Use the View button ( Tech Guide) on the RCX to get a reading from the light sensor on the display window. Accurate information will be displayed only after you initialize the input port for that sensor. That means that you have to download and run a program containing a light sensor block every time you-install firmware.

Troubleshooting: If you are getting light readings that are not between 0 and 100, or the light reading doesn’t make sense to you, download a program containing a light Sensor Watcher or a light Stack Decision Maker and run it once before using the View button.

 

 

Close Window