Potentiometer Analog Input
Explore the Uno ADC range by turning a potentiometer from end to end.

Wire it up
Disconnect power before changing connections. Follow terminal names rather than wire colors.
| From | To | Why it matters |
|---|---|---|
| Potentiometer (pot1) · VCC | Uno · 5V | Power connection |
| Potentiometer (pot1) · GND | Uno · GND.2 | Ground reference |
| Potentiometer (pot1) · SIG | Uno · A0 | Match this terminal to the sketch |
The complete sketch
void setup() { Serial.begin(9600); }
void loop() {
Serial.print("adc:"); Serial.println(analogRead(A0));
delay(100);
}
The launch buttons use this same code and a matching saved circuit.
Build it step by step
Open a complete project
Launch in Simulator creates a separate Uno sketch and its matching wired circuit. Existing sketches are preserved. Press Run to compile and execute.
Explore the live circuit
Move the knob to each endpoint and the center. Observe the values in simulated serial output.
Try it on hardware
Disconnect power while wiring. Match terminal names in the table, select the exact board, Verify, then connect and upload. Check component ratings and power requirements first.
Understand the sketch
Sampling a voltage
analogRead returns a 10-bit approximation of A0 relative to the reference. A centered ideal potentiometer gives roughly 512; the endpoints approach 0 and 1023.
If something is different
Reading floats randomly
A0 needs the wiper connection and both outer terminals need power and ground.
Expected output and tested scope
The ADC sample changes from near 0 to near 1023 as the potentiometer moves across its range.
Version 1 · Last source- and build-matched test: 2026-10-25. Actual shipped AVR-GCC WASM compilation and Uno AVR engine execution; no physical hardware test.
Supported tutorial target: Arduino Uno R3 / ATmega328P. Compile: PASS · Modeled execution: PASS. Other boards require a separate review of pins, voltage, libraries and the exact build profile.