this is an after though about the optical interuptor used for wind direction or wind speed also the photo transistor found in a mouse is actualy two detectors in one , one on top of the other. by comparing the output pulses you can deteterimine the direction its is turning , cw or ccw, rate of change or speed, and its position.
Direction by - which pulse comes first
Rate of turn - how fast the pulses come say pulse /sec
position - count pulses cw or ccw usinf a360 degree spoked wheel. i think this is called an encoder. not sure
just an after thought