In a real cockpit not every rotary knob is an encoder. Often it's a mechanical knob geared with instrument card or needle (which itself can have absolute rotary sensors on the other side). Real encoders are used in most of radio equipment displays and autopilot.Here are the examples of typical controls for which you can use encoders in your cockpit, including instrument card knobs:
For your home cockpit you can use any incremental rotary encoders that can be found on AliExpress or Ebay. No need to buy expensive ones , any cheap encoders ($0.3 ... $1 for a piece) work just fine with SimVimCockpit Interface. There is no difference in work between $0.5 encoder and $25 "brand" encoder in your home cockpit!
Depending on usage in your cockpit it can be just a single encoder or double (coaxial) encoder, or encoder with built-in push-button, so that you can switch modes to control different parameters with a single encoder.
Rotary encoders have two output terminals (A,B) and one "common C". Each output is cyclically connected to the "common" with 90 degrees out of phase when the shaft is rotated, i.e. the encoder generates quadrature signal (2-bit Gray Code sequence).
The code sequence can be processed by the controller (or hardware circuit) as direction and velocity. Commonly, in relation to the simulator, we need to get the moment of status change and the direction it was changed.
If you have an encoder with 1 cycle/detent (or one detent per 4 state changes - see encoder #1 below), and in the code each state change is processed with maximum resolution, we can discover that our controlled parameter increments/decrements for 4 units in one click (e.g. 4 degree course stepping)!
It may be acceptable for such parameters as lighting brightness but unusable for course adjustment. For this type of encoder we need to program it to reading states between detents, for determining direction, but take in account only one change per detent (i.e. the whole cycle). Say, using an encoder with 80 state changes resolution (or 80/4 = 20 PPR), and having 20 detents we can actually control HSI OBS by 20 deg/rev. (not 80).
Encoder of this type has one full cycle per detent, it differs in that it is always in the same phase state at each detent and when encoder is rotated by one "step", its outputs phase changes 4 times between two fixed positions.
All detents are in 00 state - Both A and B outputs are in open state.
All detents are in 11 state - Both A and B outputs are in closed state.
All detents are in 10 state (or 01) - A and B outputs are in opposite state.
Encoder of this type has a half cycle per detent, when encoder is rotated by one "step", its outputs change 2 times between two fixed positions.
(detents 10,01) - A and B outputs have an opposite state in one fixed position and inverted state in the next position alternately
(detents 00,11) - Both outputs A and B have a closed state in one fixed position and an open state in the next position alternately
Encoder with detent in each phase position (detents in 00,10,11,01), when encoder is rotated by one "step", its outputs change by one phase state and provide full resolution.
Encoders with 1/4 cycle per detent have full resolution. For example, if an encoder has full 9 cycles per revolution (9 PPR), it can generate 36 state changes, i.e. one per each detent. Some of such encoders may not have detents at all but thus they don't have tactile feedback.