Designing photogate for Raspberry Pi 2
Basic setup. Two "circuits". The LED can be powered by a battery or from the RPi's 5V. R-LED should be calculated for the LED you use.







simulate this circuit &ndash; Schematic created using CircuitLab