The potentiometer reads an analog value from the hardware port and outputs a normalized result in the range from
1.0, depending on the angle of the knob.
It brings an easy solution to control LEDs, servos, and system coefficients.
↓ Download as a Fritzing project
Let’s control the brightness of the LED with a potentiometer.
Connect a potentiometer to the Arduino board according to the scheme.
PORT pin value on the
pot node to
A0 because it’s connected to the analog board port A0.
VAL pin to the
LUM pin on the
Upload your patch.
Rotate the knob and see how the LED reacts to it. Cool, eh?