Skip to content

Live Sensor Serial Plotter

Print a changing analog sample and a reference as two labeled numeric series.

Live Sensor Serial Plotter: the matching Arduino Uno circuit rendered in Circuitera’s simulator
Matching Circuitera simulator circuit. Real firmware capture; modeled components are idealized.

Wire it up

Disconnect power before changing connections. Follow terminal names rather than wire colors.

FromToWhy it matters
Potentiometer (pot1) · VCCUno · 5VPower connection
Potentiometer (pot1) · GNDUno · GND.2Ground reference
Potentiometer (pot1) · SIGUno · A0Match this terminal to the sketch

The complete sketch

sensor-plotter.ino
void setup() { Serial.begin(9600); }
void loop() {
  int sample = analogRead(A0);
  Serial.print("adc:"); Serial.print(sample);
  Serial.print(" reference:"); Serial.println(512);
  delay(50);
}

The launch buttons use this same code and a matching saved circuit.

Build it step by step

  1. 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.

  2. Explore the live circuit

    Turn the virtual knob and inspect the sample stream. For hardware, open Circuitera Serial Plotter at 9600 baud to compare both traces.

  3. 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

Machine-readable samples

One newline completes one sample. The adc and reference labels identify two series. Keep unrelated prose out of the numeric stream when plotting.

If something is different

Broken plot

Print one complete sample per line and match the baud rate. The reference remains fixed at 512 by design.

Expected output and tested scope

Output includes labeled adc and reference series. At the default midpoint, the values are approximately 512.

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.

Keep exploring.