A potentiometer can sense when something rotates or twists.
Connect 5v, ground, and signal lines to the three terminals. When the input shaft turns the internal resistance of the circuit will change. The voltage on the signal line will rise or fall as the resistance changes. By understanding the change in the signal you can tell which way, how far, and how fast the input shaft has turned.