Diagnostics & Serial Debugging

Real-Time UART Telemetry

Both firmwares stream coordinate data over UART0 TX on GPIO 0 at 115200 8N1.

# Connect with tio, minicom, or screen
tio /dev/ttyUSB0 -b 115200

The digitizer prints one line per accepted report, with the raw reading and the smoothed coordinate:

Raw: X=1842 Y=2210 | Smooth: X=412 Y=248

The mouse target prints the averaged raw ADC values only:

X: 842, Y: 1203

Troubleshooting Matrix

SymptomRoot CauseSolution
No touch response on hostSPI chip select wiring or reversed MOSI/MISOVerify Pico GPIO 16 to DOUT and GPIO 19 to DIN. Check GPIO 17 (CS).
Cursor jumps to corners erraticallyCalibration limits inverted or ADC noiseInvert X_MIN/X_MAX in code or increase median filter window size.
Cursor stutters when finger held stillJitter deadband threshold too lowIncrease the minimum pixel delta threshold (abs(dx) >= 10).
Host does not recognize USB deviceMicro-USB cable is power-onlyReplace with a certified data cable.