I decided to use a solar cell (Photovoltaic) as a light meter. The idea came from Forrest Mimm's book, where he used everything from pencils & mylar to lightning as a sensor. A solar cell is good for collecting electricity from light as well as metering how much light is available.

Hooking up the cell to the PIC's analog input was easy, positive line from the cell went to the pin and the ground pin + 10K resistor went to ground. The cell I was using came from SolarBotics.com and gives off 6 Volts when bathed in bright light. As the light changes across the surface, the electricity coming out changes linearly too. So my PIC would say something like 10 if the room was very dark and 255 if the room was bright. I didn't play with the pull down resistor but I suspect it could have made the cell work better in a brighter room had the resistor been larger.

Ok so the code, the PIC is just sending out the analog sensor value whenever it receives an "A" (65). I'll put the PIC code up once I get it off a very old machine. I'll even put up a schematic

The process code displays an active line graph that is moving high on bright light and low on darkness.

Light Meter - Processing Code

Light turning on, then off

Opening a curtain in a dim room.

Solar cell is sensitive, lots of noise if you hold it by hand.