In this illustration we will going to wire the light interrupter. A photo interrupter is transmission type photo sensor that integrates optical receiving and transmitting elements in a single package please see the diagram below. Since the method involves light
Starter #9 Light Detection with (LDR) Light-Dependent Resistor with Arduino
Detecting a light or making a switch using Photoresistor interface with Arduino. Electronic Components Required Arduino UNO/MEGA/PRO 1x LED 1x 220k Ohm Resistor 1x 10k Resistor 1x LDR(Photo resistor)
Download the source code here | 14Core Light Detection