SunFounder 3in1 Kit
In this example, we use the analog pin (A0) to read the value of the potentiometer. By rotating the axis of the po-
tentiometer, you can change the distribution of resistance among these three pins, changing the voltage on the middle
pin. When the resistance between the middle and a outside pin connected to 5V is close to zero (and the resistance
between the middle and the other outside pin is close to 10k), the voltage at the middle pin is close to 5V. The reverse
operation (the resistance between the middle and a outside pin connected to 5V is close to 10k) will make the voltage
at the middle pin be close to 0V.
Wiring
4.4. 4. Analog Read 119