Among the pain of writing fairly sophisticated (by my standards) code in assembly, one small experiment looks worth pursuing.
If it is ever to be a useable indoors device, it must be usable with room lighting switched on. Early experiments had already shown that to be a challenge, requiring careful shielding of the sensor to avoid being dazzled by the room lights.
However, I vaguely remembered a snippet of information, that when used as a photodiode, an LED is sensitive to wavelengths equal to or shorter than the colour it emits. I'd been using red LEDs which would thus be sensitive to most visible light, whereas I think most indoor bulbs are weak at the blue end of the spectrum. So I bought some blue LEDs for comparison.
The blue LEDs still provide a strong signal from overcast daylight, but seem to be almost totally immune to room lighting from incandescent bulbs. A room lit by LED bulbs has a small effect, but probably at least an order of magnitude less interference than before. What remains to be seen is whether the blue LEDs are more affected by cloudy sunsets vs clear skies. I wait with interest to see.
Only problem is, I began this project on the basis that
It would consist of a photocell, a microcontroller, and an LCD character display. All of these are conveniently to hand, residing in a drawer labelled “bits & bobs”
I'm now going ahead with a different PIC, a different LCD, and different photocell. Is anybody familiar with Trigger's broom?