As Forrest Mims demonstrated back in the day, LEDs work perfectly well as narrow-band photodiodes with peak sensitivity to slightly shorter wavelengths than they emit. Aiming a red laser at an ordinary IR LED about a foot away generates 800 mV of photovoltage:
The blip comes from the shaft of a small screwdriver falling through the beam.
That’s in photovoltaic mode directly connected to the oscilloscope, but you’d want to run it through a low-gain transimpedance amplifier to get the zero bias photocurrent and a comparator for a clean digital edge. That’s obviously overkill for a simple optical interrupter, but the analog circuitry should come in handy for something else later on.
OK, now I can detect a moving object, trigger a camera, and fire a xenon flash, all under an Arduino’s control…