A microcontroller, such as an Arduino or Raspberry Pi, is typically used to process the output of an optical rotary encoder. The microcontroller can be used to count the number of transitions in the encoder output signal and calculate the speed and position of the wheel.