You'll need an
analog encoder for the potentiometers.
Wiring them is easy -- pots have three tabs and act as a voltage divider.
The middle tab (2) is called the "wiper". (middle left piece)
It provides a voltage based on which direction the shaft is turned.
The other two (1, 3) are ground and 5v, connected by a resistive element. (the black 215 degree arc)
As you turn the shaft, the bump on the right of the wiper slides along the resistive element -- closer to ground = lower voltage, closer to 5v = higher voltage.
If the axis is moving in the opposite direction desired, swap the ground and 5v wires on that pot.

(Photo by Le Chuck

)
Scott