A few members of the Alpha One Labs Hackerspace
do not like the harsh light given out by fluorescent fixtures. They wanted a way to be able to easily control the individual fixtures, perhaps with a laser pointer?
I got right on it. I dug out a pile of solid state relays and brought them to the Lab. I bought an Arduino Duemilenova and demonstrated the use of the LED Blink example sketch to actually blink a halogen lamp. I found some info on using LEDs as light sensors [1
] and an Arduino sketch demonstrating the technique[2
I found that the LEDs were not nearly sensitive enough - the laser had to point straight into the light emitting part, or the LED wouldn't register. So I switched to phototransistors. They are much more sensitive, and over a wider range of frequencies. With the proper filter over the transistor I could make it more sensitive to red light, and from a much wider range of angles to the sensor.
DISCLAIMER AND WARNING: This instructable deals with line (mains) voltage at 120 or 240 volts. Use common sense if you build this circuit - if you have a doubt about something, ask someone who knows. You are responsible for your (and others') safety, and compliance with local electrical codes.