Using the ArdSim Interface you can configure Arduino analog pins in several ways:
A common way to make an analog sensor is using a variable resistor as a voltage divider circuit. Connect the middle pin of a potentiometer directly to input, and the two others - to +5v pin and GND.
For use with Arduino you can take any potentiometer from 1k to 100k, as optimal we recommend 10-20k. (up to 100k the noise is still not a concern - no visible fluctuation for one ADC step within 0-1023 scale).
You can use analog input (with potentiometer, photo sensor or Hall-effect sensor) to control most of the simulator analog variables, including the 3 main axes - pitch, roll, yaw (these 3 axes may require most accurate sensors), throttle and other engine controls, flaps, brakes, instruments lighting etc..
Also you can use a potentiometer as a rotary knob for pointer gauges instead of encoder usage.
For such instruments as Radio Altimeter or others that have a pointer with limited rotation angle (less than 360°), any common potentiometer can be used and you can properly emulate a real knob, when the arrow is rotating corresponding to the rotating knob. (i.e. full stroke of the potentiometer is corresponding to a full circle of the gauge needle).
The instruments with continuous needle rotation, such as VOR, ADF etc. could be controlled with potentiometer as well. But potentiometers mostly have limited rotation angle, so you should rotate the knob in both directions to control the needle. It would be nice to find pot with 360° continuous rotation.
As an option, using a potentiometer as a sensor with mechanical detents (for example, you can use some rotary switch mechanism attached to the potentiometer shaft) you can make a multi-position switch to control one dataref value by setting the precision number equal to the positions number.
To control several parameters (commands or dataref values) and save numbers of digital pins you can use one analog pin as input for multi-position switch or a button switch bank.
The diagram shows how to connect a rotary switch to Arduino analog input for use with ArdSim librariy. In this example you have a rotary switch with 5 fixed positions connected to one analog pin. The 5-position switch can be used for typical magneto/starter switch.
You need to get a suitable rotary or linear switch and a number of resistors. ArdSim program reads changes in position and sends commands to X-Plane according to the position and input configuration.
For an N-position rotary switch you will need N-1 resistors 1...10k each, plus one 100ohm resistor and one 1-5 mcF capacitor. The sum of all resistor values can be between 5 and 30..50 kOhm. For example for 8-position switch you should use seven resistors having the same value (1...5k).
Also, instead of several resistors you can try to use one potentiometer with mechanical detents (rotary switch mechanism attached to the potentiometer shaft).
These two videos demonstrate how the Rotary Switches for Magnetos and Transponder work:
Similar to how we use analog input for rotary switch emulation, we can use it for multiple buttons (but not for toggle switches!). If only one button in the group would be pressed in any moment, this method is quite acceptable under this condition.
For the 10-buttons array you will need 12 resistors: 10x 200-300 Ohm, 1x 80-100 kOhm, 1x 50-100 Ohm.
Diagram: how to use Arduino analog inputs as multiple-button inputs