Programming instructions

accessories
Inventor’s Guide insert
accessories
accessories
sensor accessories
light sensor kit 3
2 Detecting light level:
Reprogramming your microcontroller to read the sensor
Start by plugging your light sensor into any port in the Analog/Digital
bank on the Vex Microcontroller. Note that the connector is keyed to fit
into the microcontroller port in a specific orientation; plugging it in
backwards could damage or even destroy your sensor.
In order for your robot to be able to read the sensor, you will have to
reprogram the microcontroller. Sample code to help you get started is
available on the Vex website. Refer to the Programming chapter in your
Vex Inventor’s Guide for information on how to add or change code.
light sensor kit, continued
1 Technical overview, continued
The light sensor has a usable range of 0 to 6 feet, so it can
distinguish a light source from ambient light up to six feet
away; a light source more than 6 feet away will blend into the
ambient light and be lost. The range is dependent on the
intensity of the light source as well as the intensity of the
ambient light in the environment. The range will be greater
for a very bright point source in a very dark room, but
dramatically reduced for a flashlight outdoors on a
sunny day.
This light sensor is sensitive to visible light only; it will not
provide useful data for infrared or ultraviolet sources.
6'
Go to Reference Links