to Wikipedia: • LED as light sensor:
"A LED is simply a diode that has been doped specifically for efficient light emission and has been packaged in a transparent case. Therefore, if inserted into a circuit in the same way as a photodiode, which is essentially the same thing, the LED will perform the same function.” • Photodiode:
"A photodiode is a type of photodetector capable of converting light into either current or voltage, depending upon the mode of operation."