Note This is a web-version of a tutorial chapter embedded right into the XOD IDE. To get a better learning experience we recommend to install the desktop IDE or start the browser-based IDE, and you’ll see the same tutorial there.

Potentiometer

Screenshot of 105-pot

The potentiometer reads an analog value from the hardware port and outputs a normalized result in the range from 0.0 to 1.0, depending on the angle of the knob.

It brings an easy solution to control LEDs, servos, and system coefficients.

Circuit #

Assembling potentiometer to Uno

↓ Download as a Fritzing project

Exercise #

Let’s control the brightness of the LED with a potentiometer.

  1. Connect a potentiometer to the Arduino board according to the scheme.

  2. Set the PORT pin value on the pot node to A0 because it’s connected to the analog board port A0.

  3. Link the pot node VAL pin to the LUM pin on the led node.

  4. Upload your patch.

Rotate the knob and see how the LED reacts to it. Cool, eh?

Found a typo or mistake? Want to improve the text? Edit this page on GitHub and open a pull request. If you have a complex proposal or you want to discuss the content, feel free to start a new thread on XOD forum.