This is a photogate timer circuit using an Arduino. It polls the status of the IR Detector (on pin 2)
Connect an IR LED between pin 12 and GND and the IR detector between pin 2 and GND. An optional LED can be connected to pin 13.
Position the IR emitter / detector pair until you see LED 13 turn on. This indicates that the IR beam is being picked up.
Open up the Serial Monitor at 115200 baud to see photogate events. Hit the reset button on the Arduino to re-start the timer.