Skip to main content
skill CX Codex

arduino-serial-monitor — Claude Code skill

arduino-serial-monitor is a Claude Code skill that reads and analyzes Arduino serial output, including boot logs, sensor data, and communication failures.

MIT 1 installs ★ 33 updated 2026-10-15

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add wedsamuel1230/embedded-engineering-skills --skill arduino-serial-monitor -a claude-code
Open on GitHub

What arduino-serial-monitor does

This skill connects to Arduino serial ports and displays data in real-time, logs output to timestamped files, filters by keywords or regex patterns, and automatically detects common error patterns. It handles text, JSON, CSV and binary formats across Windows, macOS and Linux.

You can color-code output by log level, set custom timeouts, and parse structured data for analysis. For effective debugging, format serial output as steady event lines such as t_ms=123 level=INFO event=sensor_read value=... rather than free-form text.

Requires Python 3.8+ and uv 0.4 or later; script dependencies (pyserial, colorama) are declared inline and installed on first run. Do not include passwords, API keys or personal data in serial logs.

What it helps with

  • verify board boot sequence and identify reset causes
  • capture and validate sensor readings in real-time
  • detect communication timeouts and protocol errors
  • filter noisy logs to find the relevant event
  • save timestamped logs for offline analysis or review

Example prompts for the agent

  • Monitor serial port COM3 and highlight errors: uv run --no-project scripts/monitor_serial.py --port COM3 --filter "ERROR|WARNING"
  • Log temperature sensor data with timestamps: uv run --no-project scripts/monitor_serial.py --port /dev/ttyACM0 --baud 115200 --output debug.log --timestamp
  • Parse and pretty-print JSON sensor data: uv run --no-project scripts/monitor_serial.py --port COM3 --format json --pretty

How to install arduino-serial-monitor

1Skills CLI (Vercel)

npx skills add wedsamuel1230/embedded-engineering-skills --skill arduino-serial-monitor -a claude-code

2Manually: put the files in place

~/.claude/skills/arduino-serial-monitor/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/arduino-serial-monitor/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about arduino-serial-monitor

How do I install arduino-serial-monitor in Claude Code?

Run npx skills add wedsamuel1230/embedded-engineering-skills --skill arduino-serial-monitor -a claude-code, then open ~/.claude/skills/arduino-serial-monitor/SKILL.md.

What does arduino-serial-monitor do?

It connects to Arduino serial ports, reads live output, saves logs to files, filters by patterns, and automatically detects common errors. Supports text, JSON, CSV and binary formats.

What do I need to run this skill?

Python 3.8+ and uv 0.4 or later. The script handles inline dependency installation for pyserial and colorama, so you do not need to install them separately.

Source text

SKILL.md · MIT
---
name: arduino-serial-monitor
description: Read and analyze Arduino or embedded serial output for structured runtime debugging across Arduino IDE, Arduino CLI, PlatformIO, and vendor-specific monitor tools. Use when boot output, sensor data, resets, communication failures, timing symptoms, or field behavior need evidence rather than compile-only reasoning.
metadata:
  triggers: "serial monitor, runtime logs, boot output, reset reason, sensor logs, structured debug, field symptoms"
  attribution: "Refined from the existing Arduino serial monitor skill; no separate serial-debugging skill is installed."
---

# Arduino Serial Monitor

For a desktop visualization/bench console, read
[desktop-console guidance](references/desktop-console.md). Wireless transport
and trace semantics belong to `wireless-telemetry`; do not duplicate its driver
or measurement workflow here. Native ESP-IDF logs are valid inputs to serial
diagnosis and do not imply an Arduino framework.

This skill provides advanced tools for reading and analyzing serial monitor data from Arduino boards, enhancing the debugging experience beyond the basic Arduino IDE serial monitor.

## Features

- **Real-time Serial Monitoring**: Connect to Arduino serial ports and display data in real-time
- **Data Logging**: Save serial output to files with timestamps for later analysis
- **Filtering & Pattern Matching**: Filter output by keywords, regex patterns, or data types
- **Error Detection**: Automatically highlight common error patterns and warnings
- **Multiple Format Support**: Handle different data formats (text, JSON, CSV, binary)
- **Cross-platform**: Works with Windows, macOS, and Linux serial ports

## Structured Debugging Workflow

1. Record the exact board/revision, firmware/image identifier, toolchain and
   versions, port, baud, reset cause if known, and timestamp source.
2. Prefer one line per event with stable fields such as
   `t_ms=123 level=INFO event=sensor_read value=...`; keep secrets and tokens
   out of output.
3. Capture the unfiltered log before filtering. Preserve the first boot lines,
   reset/brownout/watchdog messages, and the transition that reproduces the
   symptom.
4. Label conclusions as build, upload, hardware, system, or deployment
   evidence. Report the result by proof stages. A clean serial stream is not proof that pins, power, or the full
   system are correct.
5. Pair with `hardware-tdd` for a test matrix and `embedded-project-loop` when
   the next observation must come from a user-operated board.

## Recommended C++ Event Format

```cpp
Serial.print("t_ms=");
Serial.print(millis());
Serial.print(" level=INFO event=ready board=");
Serial.println(BOARD_ID);
```

Use a fixed, bounded format appropriate to the board's memory budget. Do not
log Wi-Fi passwords, API keys, certificates, tokens, or private data.

## Usage

### Basic Serial Monitoring

```bash
# Monitor serial port with default settings (9600 baud)
uv run --no-project scripts/monitor_serial.py --port COM3

# Specify baud rate and output file
uv run --no-project scripts/monitor_serial.py --port /dev/ttyACM0 --baud 115200 --output debug.log

# Filter for specific patterns
uv run --no-project scripts/monitor_serial.py --port COM3 --filter "ERROR|WARNING"
```

### Advanced Debugging

```bash
# Parse JSON data from serial
uv run --no-project scripts/monitor_serial.py --port COM3 --format json --pretty

# Monitor with timestamp and color coding
uv run --no-project scripts/monitor_serial.py --port COM3 --timestamp --color

# Detect common Arduino errors
uv run --no-project scripts/monitor_serial.py --port COM3 --detect-errors
```

## Script Options

- `--port`: Serial port (e.g., COM3, /dev/ttyACM0)
- `--baud`: Baud rate (default: 9600)
- `--output`: Output file for logging
- `--filter`: Regex pattern to filter lines
- `--format`: Data format (text, json, csv, binary)
- `--timestamp`: Add timestamps to output
- `--color`: Enable color-coded output
- `--detect-errors`: Highlight common error patterns
- `--timeout`: Connection timeout in seconds

## Common Arduino Debugging Scenarios

### Memory Issues
```
Filter for: "low memory|stack overflow|heap"
```

### Sensor Data Validation
```
Filter for: "sensor|reading|value"
Format as: json
```

### Timing Analysis
```
Enable: --timestamp
Filter for: "start|end|duration"
```

### Communication Errors
```
Filter for: "timeout|failed|error"
Enable: --detect-errors
```

## Integration with Arduino CLI

```bash
# Compile and upload, then monitor
arduino-cli compile --fqbn arduino:avr:uno sketch/
arduino-cli upload -p COM3 --fqbn arduino:avr:uno sketch/
uv run --no-project scripts/monitor_serial.py --port COM3
```

## Troubleshooting

### Port Not Found
- Check `arduino-cli board list` for available ports
- Ensure Arduino is connected and drivers are installed
- Try different port names (COM1-COM99 on Windows, /dev/ttyACM* on Linux)

### No Data Received
- Verify baud rate matches Arduino sketch (`Serial.begin(9600)`)
- Check USB cable connection
- Reset Arduino board while monitoring

### Permission Errors (Linux/macOS)
```bash
# Add user to dialout group
sudo usermod -a -G dialout $USER
# Logout and login again
```

## Evidence And Privacy

Record the board, firmware/image version, toolchain, baud, port, reset cause,
and timestamp source. Label serial output as hardware or system evidence only
when it was captured on the target. Redact Wi-Fi passwords, API keys,
certificates, tokens, and personal data before saving logs or sharing them.

## Dependencies

- Python 3.8+
- `uv` 0.4+ (the script declares `pyserial` and `colorama` inline)
- Run the self-contained helper with `uv run --no-project scripts/monitor_serial.py --help`.

## Examples

### Basic Temperature Sensor Monitoring

```python
// Arduino sketch
void setup() {
  Serial.begin(9600);
}

void loop() {
  float temp = analogRead(A0) * 0.488;
  Serial.print("Temperature: ");
  Serial.print(temp);
  Serial.println(" C");
  delay(1000);
}
```

```bash
uv run --no-project scripts/monitor_serial.py --port COM3 --filter "Temperature" --timestamp
```

### JSON Data Parsing

```python
// Arduino sketch with JSON output
#include <ArduinoJson.h>

void setup() {
  Serial.begin(115200);
}

void loop() {
  StaticJsonDocument<200> doc;
  doc["temperature"] = analogRead(A0) * 0.488;
  doc["humidity"] = analogRead(A1) * 0.146;
  doc["timestamp"] = millis();
  serializeJson(doc, Serial);
  Serial.println();
  delay(2000);
}
```

```bash
uv run --no-project scripts/monitor_serial.py --port COM3 --format json --pretty
```

## Shared Output Contract

Use [the shared Arduino skill contract](../../docs/arduino-skill-contract.md):
state assumptions, required tools and versions, implementation steps,
tests/evidence by proof stage, known limitations, and recovery/security notes.

© wedsamuel1230 · MIT · wedsamuel1230/embedded-engineering-skills

Similar skills

All skills for Testing and QA →

From the same set19

The whole set →
code-review-facilitator The code-review-facilitator skill reviews Arduino, ESP32, and RP2040 projects for memory risks, structural issues, and common mistakes. Use it before publishing code or after finishing a feature. CX Codex +1 154installs readme-generator readme-generator generates README.md files for Arduino, ESP32, and RP2040 projects. Use it when a working project needs clear GitHub documentation. CX Codex +1 147installs sensor-calibration-workbench The sensor-calibration-workbench skill guides sensor calibration from warm-up and reference readings to coefficient storage and drift checks for CO2, load-cell, magnetic, color, and analog sensors. CX Codex +1 137installs i2c-bringup-diagnostician i2c-bringup-diagnostician diagnoses I2C bring-up failures on Arduino and ESP32 boards, covering wiring, scanner mismatches, and driver bugs. CX Codex +1 134installs freertos-patterns freertos-patterns picks the right FreeRTOS pattern for ESP32 tasks or RP2040 dual-core work: queues, mutexes, notifications, stack checks. CX Codex +1 120installs ota-deployment-guardian ota-deployment-guardian prevents remote bricking on ESP32 boards and Arduino Uno R4 WiFi during OTA updates. Troubleshoots disappearing network ports and sets up rollback workflows. CX Codex +1 115installs mermaid-diagram-generator mermaid-diagram-generator is a Claude Code skill that turns Arduino code and embedded-system behavior into Mermaid diagrams for mapping states, signal sequences, and FreeRTOS task architecture. CX Codex +1 113installs field-power-and-connectivity-triager field-power-and-connectivity-triager is a Claude Code skill that investigates power and connectivity faults when a board works over USB but fails on its intended supply. It checks voltage drops, current peaks, regulators, and wiring. CX Codex +1 113installs

Project sponsors

Companies that keep this analytics open