I’m not sure if this falls under useful or useless. I’ll let others be the judge.
It’s definitely useless in the emulator. You’ll have to load it into a real Arduboy.
ArduboyLightMeter.hex (32.7 KB)
Source code is here:
The technique used may be of some use in other sketches, such as:
An alarm triggered by the ambient light level.
Something similar to a tilt sensor. A light falling on the Arduboy at various angles would give readings somewhat proportional to the angle.
“Wireless” optical communication between two Arduboys or an Arduboy and some other device. One device could modulate a light source while the other receives it, and vice versa.