A photointerrupter is a type of non-contact optical switch. A light emitting element and light receiving element are arranged in opposition to each other and when a target object passes between them the light is interrupted, indicating the presence of the object. Unlike mechanical switches, there are no contact points, eliminating wear and tear for greater reliability. The operating principle is based on the conversion of light and electricity. When current is applied to an LED, the LED emits light, and when that light enters a phototransistor, current flows through it. An object is detected by reading the current change in the phototransistor that accompanies the presence of a light-shielding object. As a usage case, the presence of an object can be simply detected, or the number of rotations detected using a slit.