🛠 Read a potentiometer with the 14-bit ADC

Arduino UNO R4 Minima · debutant · Schéma : IMG-uno-r4-minima-debutant-2-potentiometre-adc-14-bits.svg — UNO R4 Minima avec potentiomètre 10 kΩ sur A0 (5 V / A0 / GND), moniteur série affichant des valeurs 0–16383, badge ADC 14 bits.

Goal

Use the RA4M1 ADC, which resolves up to 14 bits (0-16383) against the AVR Uno's 10 bits, to read a potentiometer and watch it live in the Serial Plotter.

Wiring

Potentiometer: outer legs to 5 V and GND, wiper to A0. The board logic is 5 V, so a 5 V rail is fine here.

Code

void setup {
  Serial.begin(115200);
  analogReadResolution(14);   // 0..16383 (default is lower)
}

void loop {
  Serial.println(analogRead(A0));
  delay(2);
}

Open the Serial Plotter and turn the knob: a smooth ramp from rail to rail. Because the ADC is much finer, small knob moves that were invisible on an R3 now show up.

Expected result

Stable values near 0 and 16383 at the extremes; mid-turn values around 8192 with a few LSBs of noise, which is normal at this resolution.

Common mistakes

Other tutorials for this board

Code examples for this board

← Back to the board 🛠 All tutorials