This slot sensor detects when something is blocking the slot between infrared emitter and receiver. When the infrared receiver detects a low input value the integrated LM393 comparator emits a digital on signal. The raw analog signal is also directly available in addition to the digital pin.
This sensor is great for counting things, triggering a machine to stop when it reaches a certain point, or detecting when a door is closed. These are commonly used as endstops in 3D printers. Another common use is for measuring revolutions of a rotating object.
One limitation of this sensor is for detecting something that’s very thin. The object being detected has to block most of the slot width to block the infrared beam of light enough to be detected reliably.
10 x Optical Slot Sensor Module