#include <Arduino.h>

// Pot outer legs 5V/GND; wiper A0; PlatformIO Monitor 9600 baud.
const int potPin = A0;

void setup() {
  // Open the Serial interface at 9600 baud so the computer can display readings.
  Serial.begin(9600);
}

void loop() {
  // Read A0: on an Uno, the default 10-bit ADC gives counts from 0 to 1023.
  int raw = analogRead(potPin);
  // Print the numeric reading followed by a newline so each sample appears on its own line.
  Serial.println(raw);
  // A 100 ms pause yields about ten readings per second.
  delay(100);
}
