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
| Symptom | Root Cause | Solution |
|---|---|---|
| No touch response on host | SPI chip select wiring or reversed MOSI/MISO | Verify Pico GPIO 16 to DOUT and GPIO 19 to DIN. Check GPIO 17 (CS). |
| Cursor jumps to corners erratically | Calibration limits inverted or ADC noise | Invert X_MIN/X_MAX in code or increase median filter window size. |
| Cursor stutters when finger held still | Jitter deadband threshold too low | Increase the minimum pixel delta threshold (abs(dx) >= 10). |
| Host does not recognize USB device | Micro-USB cable is power-only | Replace with a certified data cable. |