The SparkFun BOB-00203 is a PCB for the Photo Interrupter CNZ1120.
This PCB has three connections for PWR (3V-6V), GND, and Signal. When the gate is clear, SIG will be low (<0.5V). When the gate is blocked by a finger, writing utensil, food pellet, or anything else - SIG will go high (>4.5V). Assembled picture is for reference only. Parts are listed below. 220 or 330Ohm resistor will work.
Note: The CNZ1120 is discontinued, but if you have one, the PCB (BOB-00203) is still avaiable for it.
Schematic design BOB-00203