The Grove - Optical Rotary Encoder is a transmissive sensor that includes an infrared emitter and two phototransistor detectors. Usually, the infrared emitter emits infrared rays, the phototransistor detectors receives the infrared rays, then the phototransistor is turned on, both outputs are High, the on-board LED indicators light up. When there is an obstacle blocking, the phototransistor cannot receive the infrared rays, so the phototransistor will be turned off and both outputs will be Low, the on-board LED indicators fade away.You can use this sensor as a rotary encoder to detect the speed or rotation, and thanks to the two phototransistor detectors, you even can detect the rotation direction.Features: Double phototransistor detectors can determine the direction of rotation On-board LED indicators Grove Interface, easy to use