PINSCOPEField Instrument 005
GitHub

Bring-up

Arduino Uno Q on macOS, phase by phase

This walkthrough covers bringing PinScope up on real hardware. It is tailored to the Arduino Uno Q on macOS, but most phases apply to any supported board. Each phase has a clear pass criterion. When something fails, capture the exact symptom (error text, screenshot, output) and work backwards from there.

Why this matters

The Uno Q is the most uncertain target because its MCU runs Arduino sketches under Zephyr OS via arduino:zephyr:unoq, not bare-metal classic Arduino. The serial firmware (pinscope.ino) has compile-time guards for this, but runtime behavior of attachInterrupt, Wire.h, and analogReadResolution can still surprise. Go slowly and verify at each layer.

00

Hardware sanity

Before anything software-related:

Pass criterion At least one /dev/cu.usbmodem* device appears.

Likely failure modes

  • No device shows up: try a different USB-C cable. Many cables are charge-only and don't carry data.
  • Device disappears after a few seconds: power delivery issue. Try a different port or a powered hub.
  • Two devices show up: the Uno Q exposes both the Qualcomm Linux side and the STM32U585 MCU side. Both are normal.
01

Tooling install

Option A: Arduino IDE 2.x

Option B: arduino-cli

brew install arduino-cli
arduino-cli core update-index
arduino-cli core search uno
arduino-cli core install arduino:zephyr
arduino-cli board listall | grep -i "uno q"
Pass criterion The board shows up in the board list with FQBN arduino:zephyr:unoq.

Likely failure modes

  • "Board not found" after install: Boards Manager may not yet expose Uno Q via the public catalog. Workaround: install Arduino App Lab from arduino.cc.
  • arduino-cli too old: brew upgrade arduino-cli. Anything older than 1.0.0 won't recognize the Zephyr core.
02

Compile the serial firmware

First real test. Not flashing yet, just confirming the sketch compiles against the Zephyr-based Uno Q core. pinscope.ino has board-detection macros that set PINSCOPE_ADC_BITS = 12 and the right board name for Uno Q automatically. No manual edits should be needed.

cd pinscope
scripts/compile.sh pinscope.ino arduino:zephyr:unoq
Pass criterion Clean compile, no errors. Note the sketch size in the output.

Likely failure modes

  • attachInterrupt or digitalPinToInterrupt undefined: the Zephyr core is supposed to expose the classic Arduino interrupt API. If not, FREQ mode needs another guard.
  • Wire.h not found: should be bundled, but if Zephyr renames it (e.g. ZephyrI2C.h), conditional include needed.
  • analogReadResolution(12) undefined: the PINSCOPE_SET_ADC_RES macro guards the call so we can flip it to 0 for boards that don't support it.
  • "Sketch too big" or "no upload protocol": library or board config mismatch.
03

Flash

arduino-cli upload \
  -p /dev/cu.usbmodemXXXX \
  --fqbn arduino:zephyr:unoq \
  /path/to/sketch

Or from the IDE: hit the arrow (Upload).

Pass criterion Upload completes, board reboots. On-board LED behavior may briefly change.

Likely failure modes

  • 1200-bps touch fails: double-tap the reset button on the board to force bootloader mode, then upload.
  • "Port not found" mid-upload: macOS sometimes reassigns the /dev/cu.usbmodem* number after a reboot. Re-run ls /dev/cu.usbmodem*.
04

Serial monitor smoke test

Don't open PinScope yet. First confirm the firmware boots and emits sensible output.

Pass criterion
{"t":"hello","id":"FI005-XXXX","name":"Arduino Uno Q","hz":10,"adcMax":4095}
{"t":"state","d":[0,0,0,...],"a":[N,N,...],...}
The adcMax:4095 indicates 12-bit ADC reporting. State packets follow every ~100 ms.

Likely failure modes

  • Nothing at all: serial isn't connecting. Check baud (must be 115200), port, that nothing else is holding the port open.
  • Garbled text: the firmware came up but at a different baud. Try 9600 or 921600.
  • Only state lines, no hello: the firmware is alive but missed your command. Try {"cmd":"poll"} to confirm command parsing.
05

PinScope console connect

Pass criterion Within a second, a device card appears titled "Arduino Uno Q" with an id like FI005-XXXX, tx/rx counters ticking, analog channel bars for A0-A5 wiggling.

Likely failure modes

  • Picker shows no devices: Web Serial requires HTTPS or file://. Open the HTML file from disk, not http://. Chromium-only.
  • "Connection failed": another process has the port open. Close the Arduino IDE Serial Monitor and try again.
  • No state updates: tx counter goes up, rx stays at zero. The browser is sending but the firmware isn't responding. Re-check Phase 4.
06

Pin control round-trip

First real interactive test:

Pass criterion LED responds to clicks within ~100 ms.
07

Analog + strip chart

Pass criterion Trace responds instantly, values match expected scale (0-4095 for Uno Q's 12-bit ADC, since the hello packet's adcMax drove the auto-detect).

Likely failure modes

  • Flat line at 0 or 4095: ADC isn't being read, or analogRead(A0+i) doesn't work on this board.
  • Values stuck in 0-1023 range when board should be 12-bit: adcMax in the hello packet didn't propagate. Manually click the "12" toggle as a workaround and tell me (that's a real bug to fix).
08

PWM

Pass criterion Smooth ramp, no flicker steps.
09

FREQ mode

Pass criterion Hz value matches PWM frequency on the Uno Q.

Likely failure modes

  • "no interrupt on pin": digitalPinToInterrupt(2) returned NOT_AN_INTERRUPT. Try D3. If all pins fail, the Zephyr core doesn't expose the classic interrupt API and FREQ needs a native implementation.
  • "0 Hz" persistently: ISR is attached but never firing. Edge polarity or signal-level issue.
10

I2C scan

Skip this if you don't have a Qwiic device handy.

Pass criterion At least one address lights up.

Likely failure modes

  • Empty scan: wiring (pull-ups? supply voltage? SDA/SCL swapped?), or Wire library on Uno Q uses different default pins.
11

Session save + replay

Non-hardware sanity checks:

What success looks like

Phases 1-8 all green means the core PinScope experience works on Uno Q. Phases 9-11 are bonus and tell you how complete the Zephyr-core compatibility is.

After bring-up, possible next steps:

When you get stuck

The structure of a useful bug report:

  1. Which phase you got to
  2. What the expected pass criterion was
  3. What actually happened (exact text or screenshot)
  4. The relevant Wire Log entries if any

File at github.com/mbparks/pinscope/issues.