Measure nightsky with TSL237

minaya:
@GoForSome, Using a LED as a sensor you mean?. I think the photosensitive area is pretty small here (and then the current it generates will be in the range of 1pA or even less), but it would be interesting to test them as their are super cheap and you can get them with any spectral range you want (different led colors).

There's a led as a light sensor sketch where you park a led and resistor between two pins. You charge the led as you would a capacitor and that <= 1 pA degrades the minute charge over time. In the dark it could take a few msecs at least, in the bright it could take less than 50 usecs. Mitsubishi Labs uses it for rock solid, dirt cheap wireless and to make self-adjusting brightness LCD's.

You're not trying to measure low current except as the time it takes to bring a digital pin LOW. It would only be as good as the calibration at best. But then just how to calibrate closely, I dunno.

Charge in a clear-lens IR led would degrade with near-IR and every higher frequency light. Leds with colored lenses filter what they get IIRC, and even that is used in some apps.