Data Sheet
Core Spartan Documentation Modern Robotics, Inc
Version 3.0.3 Page 36
8.5. Light Sensor (45-2015)
The Light Sensor detects the ambient light level using a phototransistor. It returns a
quasi-logarithmic analog value that allows the Light Sensor to be used over at least four
decades of light. This means that the Light Sensor can detect small changes in light and
dark environments. Refer to the Light Sensor example folder for more information on
different implementation methods.
Light Sensor functions:
CORE_ANALOG(unsigned char port)
int read(void)
CORE_ANALOG(unsigned char port)
Save the pinMode for future reads and writes.
This must be done before setup().
CORE_ANALOG light(A3);
int read(void)
Returns the value read by the Light Sensor.
int value;
value = light.read();
…or…
Serial.print(light.read());










