Turn a dial or pinch a rectangle to send a value to the computer.
Basic circuit layout
Connect the two outside pins to power (5V, +) and ground (GND, -). It
does not matter which. The middle pin connects to one of the “analong
inputs” A0 through A5. Memorize this setup.
Basic coding
The
block gets a number from 0 to 1023 for your program, based on the
voltage of the input you select.
I will use for the variable that holds the reading from
the potentiometer. You should name the variable whatever makes sense
for you. Sometimes “brightness” is a good name.