Tiny Ambient Light Sensor - davidmckechnie/IoTChallenge2015 GitHub Wiki
The Ambient Light Sensor
Using the light sensor is very easy. There is sample code at the product page as well as a sample code in this repo.
If you use the sample here (ambient_light.ino
), you'll need to have hardware set up a bit light this:
The sample code will take a light reading and then display the intensity on the LEDs. The LEDOn
function here is an example of how to control the LEDs, which you could also use (even if you aren't using the light sensor).