Incremental Rotary encoders typically provide quadrature output on two pins:
LEAP#118 RotaryEncoderMethods demonstrates various ways of using a rotary encoder with an Arduino, but I’m inspired to throw away the microcontroller for a more basic demonstration after reading Experiment 101: Rotary Encoders from ARRL Hands-on Radio (Vol 2).
This project demonstrates a forward/reverse LED indicator using simple digital logic and a mini rotary encoder.
As always, all notes, schematics and code are in the Little Electronics & Arduino Projects repo on GitHub