LEDs are extremely common in electronic devices. They are used as light emitters, but can also be used as light detectors since they are photodiodes. By quickly switching between light emitting and detecting, you can use the LEDs to determine the ambient lighting and even do bidirectional communication. MERL has a good paper covering the basics of how this system works and how they used it as a "last-centimeter" communication device. The system can be implemented using one LED, a resistor, and two I/O pins. So, it could be used cheaply in almost any device. The microprocessor quickly switches the LED between emitting light, detecting light (LED acts as a charging capacitor), and measuring the discharge rate of the LED to determine light level. Jeff Han has a neat video demo of how this system can be used as a proximity sensor.
UPDATE: [hawkeyeaz1] pointed to a blog covering one person's investigations into LED sensors.
[thanks branen]


1. #22 - Thats funny that you posted that right after me because the first thing I thought of when I started shopping for LEDs was to use IR! The one downside to using this in a practical application that I can see is that it will light the whole room up red. Also does anyone know if there are even any oled panels (no matter how small and what inputs) available at all to do any testing? I know its a fairly new tech so I don't know how available it is. Just thinking about a 1/2mm thick display/touch screen makes me want to start building right now.
Posted at 3:09PM on Sep 3rd 2006 by Ben