There is an analog light sensor, part number ALS-PT19, in the top left part of the board. This can be used to detect ambient light, with similar spectral response to the human eye. There is a 10K balancing resistor to convert the current drive to voltage.
This sensor is connect to analog pin #A5, you can use analogRead or the library to read the analog value. It will read between 0 and 1023 with higher values corresponding to brighter light levels. The range is approximately 0 Lux to 1500 Lux maximum.
1000 Lux will roughly read as 2 Volts (or about 680 as a raw analog reading). A reading of about 300 is common for most indoor light levels. Note that outdoor daylight is 10,000 Lux or even higher, so this sensor is best suited for indoor light levels!
Text editor powered by tinymce.