Read a knob
Reads the potentiometer on A0 as a number from 0 to 1023.
Input
potAnalog
Why this support circuit is added
Analog input (divider).
Grounded in the catalog and golden patterns (real open-source circuits). Every auto-inserted part comes with a reason.
No extra support circuit for this part — only the board rail and the connector are wired.
Run them in the browser, no login needed.
Reads the potentiometer on A0 as a number from 0 to 1023.
Converts the 0–1023 reading into volts and prints that instead.
Maps the A0 reading straight onto an audible frequency.
Reads several inputs and sounds the note belonging to whichever is pressed.
The A0 reading is used directly as the delay, so turning it speeds the blink up.
Scales 0–1023 down to 0–255 for analogWrite. This is what map() is for.
Averages the last ten samples. Every sensor project meets this problem.
Learns the lowest and highest values it sees in the first five seconds, then scales to those.
The higher the reading, the more LEDs light. The simplest way to see a number.
The LED comes on only when the reading crosses a number you chose. if in its simplest form.
Stays inside the while-loop for as long as the button is down.
Splits a reading into ranges and does something different in each — tidier than a stack of ifs.
Turn the potentiometer and the servo horn follows it to the same angle.
The servo follows the potentiometer; DHT22 humidity goes to the LCD.
Prints each way of constructing a String, one after another.
Adds numbers and text with + to build one sentence.
Uses += to keep adding to the end of a string.
Shows what ==, > and < do to text — not the same as with numbers.
Tests whether a string begins or ends with something.