
Michael Beyhs shows us how to use an LED as a sensor:
How the code works:
- Configure all analog inputs to outputs and pull low to turn on all red LEDs.
- Turn one analog input pin into an actual Input and read the amount of light that is reflected into it.
- Turn that input back into an output and continue on to next.
- After all inputs have been read adjust the PWM of the blue LEDs according to the amount of light that was measured.
- loop forever…
Via Hacked Gadgets.

The usual (more sensitive) method of using an LED as a light sensor is to charge a diode with a reverse bias, then measure the time it takes to discharge. If the LED is used as an emitter and sensor, then 2 ports are needed to be able to forward bias as an emitter and reverse as a sensor. Search “led light sensor” or “forrest mims led sensor”.
http://www.youtube.com/watch?v=l0joutRSC1M
Besides light, what is it sensing?
The force :)