MCPInstall

error-message-explainer

Explain Arduino and embedded compiler, upload, boot, power, and runtime errors in plain English. Use when a user shares an error or failure from Arduino IDE, Arduino CLI, PlatformIO, or a vendor-specific tool. Separate build, upload, hardware, and system evidence and give a board-specific recovery path without assuming UNO, ESP32, or RP2040 behavior.

Installs
191
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/wedsamuel1230/embedded-engineering-skills --skill error-message-explainer
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads error-message-explainer automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

Error Message Explainer

Translates cryptic compiler errors into actionable fixes for Arduino/ESP32/RP2040 projects.

Resources

This skill includes bundled tools:

  • scripts/parse_errors.py - Automated error analysis with 20+ error patterns
  • ../../docs/board-support/uno-r4-family.md - Shared Uno R4 board-family caveats

Quick Start

Analyze error from file:

uv run --no-project scripts/parse_errors.py --file error_log.txt

Analyze single error:

uv run --no-project scripts/parse_errors.py --message "error: 'LED' was not declared in this scope"

Interactive mode:

uv run --no-project scripts/parse_errors.py --interactive

Pipe from compiler:

arduino-cli compile 2>&1 | uv run --no-project scripts/parse_errors.py --stdin

How to Use This Skill

When user pastes an error message:

  1. Identify the error type from patterns below
  2. Explain what it means in simple terms
  3. Show the specific fix with code example
  4. Explain WHY this error happens (educational value)
  5. If the target is Uno R4 family and the failure touches WiFi, OTA, USB, or board recognition, open ../../docs/board-support/uno-r4-family.md

Recovery Boundary

Before recommending a reset, erase, bootloader repair, or reflash, capture the exact board/revision, tool and library versions, port, power path, and last known-good image. Use the router recovery reference for failed uploads, boot failures, power faults, or corrupted firmware. Do not call a compile fix a hardware or system fix.

Common Compilation Errors

1. "'xyz' was not declared in this scope"

error: 'xyz' was not declared in this scope

Meaning: Compiler doesn't recognize the name xyz.

Common Causes & Fixes:

CauseFix
Typo in variable/function nameCheck spelling, C++ is case-sensitive!
Variable used before declarationMove declaration before first use
Missing #includeAdd required library header
Function defined after it's calledAdd forward declaration or move function up

Example - Typo:

// WRONG
int ledpin = 13;      // lowercase 'p'
digitalWrite(ledPin, HIGH);  // uppercase 'P' - DIFFERENT!

// CORRECT
int ledPin = 13;
digitalWrite(ledPin, HIGH);

Example - Missing Include:

// WRONG - Servo not defined!
Servo myServo;

// CORRECT
#include <Servo.h>
Servo myServo;

2. "expected ';' before..."

error: expected ';' before 'xyz'

Meaning: Missing semicolon on the previous line.

Fix: Add ; at end of the line ABOVE the error.

// WRONG - error points to line 3
int x = 5       // ← missing ; here!
int y = 10;

// CORRECT
int x = 5;
int y = 10;

Pro Tip: The error line number is where compiler noticed the problem, not where the missing ; is!


3. "expected ')' before..." or "expected '}' before..."

error: expected ')' before ';'
error: expected '}' at end of input

Meaning: Mismatched parentheses or braces.

Common Patterns:

// WRONG - unmatched parenthesis
if (x > 5 {  // missing )
}

// WRONG - unmatched brace
void setup() {
    Serial.begin(115200);
// missing closing }

// CORRECT
if (x > 5) {
}

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

Debugging Tip: Use IDE auto-format (Ctrl+T) to reveal mismatches.


4. "invalid conversion from 'const char*' to 'char*'"

error: invalid conversion from 'const char*' to 'char*'

Meaning: Trying to modify a string literal (which is read-only).

// WRONG
char* message = "Hello";  // string literals are const!
message[0] = 'h';         // can't modify!

// CORRECT (if you need to modify)
char message[] = "Hello"; // creates modifiable copy
message[0] = 'h';         // OK!

// CORRECT (if read-only is fine)
const char* message = "Hello";

5. "no matching function for call to..."

error: no matching function for call to 'SomeClass::method(int, int, int)'
note: candidate: void SomeClass::method(int, int)

Meaning: Function called with wrong number or type of arguments.

// WRONG - too many arguments
myServo.write(90, 100);  // write() takes only 1 argument!

// CORRECT
myServo.write(90);

Read the "note:" lines - they show what arguments ARE accepted.


6. "multiple definition of 'xyz'"

error: multiple definition of 'xyz'

Meaning: Same variable/function defined in multiple files.

Fixes:

// In header file (.h), use 'extern':
extern int globalVar;  // declaration only

// In ONE .cpp file, define it:
int globalVar = 0;     // actual definition

Or for functions in header:

// WRONG - defined in header, included multiple times
int add(int a, int b) { return a + b; }

// CORRECT - use 'inline'
inline int add(int a, int b) { return a + b; }

7. "'xyz' does not name a type"

error: 'WiFiClient' does not name a type

Meaning: Class/type not recognized.

Fixes:

BoardLibraryInclude
ESP32WiFi#include <WiFi.h>
ESP8266WiFi#include <ESP8266WiFi.h>
Arduino + WiFi ShieldWiFi#include <WiFi.h>
// WRONG
WiFiClient client;  // WiFiClient unknown!

// CORRECT for ESP32
#include <WiFi.h>
WiFiClient client;

8. "redefinition of 'xyz'"

error: redefinition of 'int x'

Meaning: Variable declared twice in same scope.

// WRONG
int count = 0;
int count = 0;  // redefinition!

// WRONG in loops
for (int i = 0; i < 10; i++) {
    int i = 5;  // shadows loop variable!
}

// CORRECT
int count = 0;  // declare once
count = 5;      // assign without 'int'

Upload Errors

9. "avrdude: stk500_recv(): programmer is not responding"

avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt X of 10: not in sync

Meaning: Arduino IDE can't communicate with the board.

Fixes (try in order):

  1. ✅ Correct board selected? (Tools → Board)
  2. ✅ Correct port selected? (Tools → Port)
  3. ✅ USB cable is data cable (not charge-only)?
  4. ✅ Try different USB port
  5. ✅ Nothing connected to pins 0/1 (TX/RX)?
  6. ✅ Press reset button during upload
  7. ✅ Install/reinstall USB drivers

10. "A fatal error occurred: Failed to connect to ESP32"

A fatal error occurred: Failed to connect to ESP32: 
Timed out waiting for packet header

Meaning: ESP32 not entering bootloader mode.

Fix: Hold BOOT button while uploading:

  1. Click Upload in IDE
  2. When "Connecting..." appears, hold BOOT button
  3. Release when upload starts
  4. Some boards: hold BOOT, press EN/RST, release BOOT

11. "Sketch too big"

Sketch too big; see https://support.arduino.cc/...
Sketch uses 34816 bytes (107%) of program storage space.
Maximum is 32256 bytes.

Meaning: Program doesn't fit in flash memory.

Fixes:

// 1. Use F() macro for strings (saves RAM + sometimes Flash)
Serial.println(F("This string in flash"));  // instead of RAM

// 2. Remove unused libraries
// Each #include adds code even if not used

// 3. Use smaller data types
uint8_t x = 5;  // instead of int (2 bytes saved)

// 4. Choose board with more flash (ESP32 has 4MB vs Arduino's 32KB)

Library Errors

12. "fatal error: xyz.h: No such file or directory"

fatal error: Adafruit_BME280.h: No such file or directory

Meaning: Library not installed.

Fix:

  1. Sketch → Include Library → Manage Libraries
  2. Search for library name
  3. Click Install
  4. If not in Library Manager: download ZIP, Sketch → Include Library → Add .ZIP Library

13. "exit status 1 / Error compiling for board..."

exit status 1
Error compiling for board Arduino Uno.

Meaning: Generic error - scroll UP to find the real error message.

The actual error is ABOVE this line! Look for lines containing error:.


Type Errors

14. "cannot convert 'String' to 'const char*'"

error: cannot convert 'String' to 'const char*'

Meaning: Function expects C-string but got Arduino String.

// WRONG
String myString = "hello";
someFunction(myString);  // if someFunction expects const char*

// CORRECT
String myString = "hello";
someFunction(myString.c_str());  // convert to C-string

15. "invalid operands to binary expression"

error: invalid operands of types 'const char*' and 'const char*' to binary 'operator+'

Meaning: Can't use + with C-strings.

// WRONG
const char* a = "hello";
const char* b = " world";
const char* c = a + b;  // doesn't work!

// CORRECT - use String
String a = "hello";
String b = " world";
String c = a + b;  // works!

// Or use snprintf
char c[20];
snprintf(c, sizeof(c), "%s%s", a, b);

Quick Reference Table

Error ContainsLikely ProblemQuick Fix
"not declared"Typo or missing includeCheck spelling, add #include
"expected ';'"Missing semicolonAdd ; to line ABOVE error
"expected ')'"Unmatched parenthesisCount ( and )
"expected '}'"Unmatched braceCount { and }
"no matching function"Wrong argumentsCheck function signature
"does not name a type"Missing libraryAdd #include
"multiple definition"Defined in multiple filesUse extern
"stk500"Upload failedCheck board/port/cable
"No such file"Library not installedInstall via Library Manager
"too big"Out of flashUse F(), remove unused code

Debugging Strategy

  1. Read the FIRST error (later ones often cascade)
  2. Note the FILE and LINE NUMBER
  3. Look at that line AND the line above
  4. Check for common patterns above
  5. Fix ONE error at a time, recompile
  6. Repeat until clean

Shared Output Contract

Use the shared Arduino skill contract: state assumptions, required tools and versions, implementation steps, tests/evidence by proof stage, known limitations, and recovery/security notes.

FAQ

What does the error-message-explainer skill do?

Explain Arduino and embedded compiler, upload, boot, power, and runtime errors in plain English. Use when a user shares an error or failure from Arduino IDE, Arduino CLI, PlatformIO, or a vendor-specific tool. Separate build, upload, hardware, and system evidence and give a board-specific recovery path without assuming UNO, ESP32, or RP2040 behavior.

How do I install error-message-explainer?

Run npx skills add https://github.com/wedsamuel1230/embedded-engineering-skills --skill error-message-explainer in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/error-message-explainer/ (personal) or .claude/skills/error-message-explainer/ (project).

Which AI agents can use error-message-explainer?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is error-message-explainer safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains error-message-explainer?

It is published by wedsamuel1230 in wedsamuel1230/embedded-engineering-skills. It has 191 recorded installs.

More from wedsamuel1230/embedded-engineering-skills

View all →

arduino-project-builder

wedsamuel1230/embedded-engineering-skills

Build complete Arduino and embedded projects across Arduino IDE, Arduino CLI, PlatformIO, and vendor-specific toolchains. Use when users request an application combining firmware, sensors, actuators, networking, power, or deployment rather than a code snippet. The bundled scaffold targets UNO, ESP32, and Raspberry Pi Pico; use the board profile and document limitations for other targets.

DevOps & Cloud540 installs

arduino-code-generator

wedsamuel1230/embedded-engineering-skills

Generate Arduino and embedded C++ snippets for sensors, actuators, buses, state machines, timing, data logging, and hardware abstraction. Use when a user requests implementation code and provide the exact board, framework, toolchain, pins, voltage, memory, and library versions first. Bundled templates target UNO, ESP32, and RP2040; document unsupported board or vendor-framework behavior instead of guessing.

DevOps & Cloud429 installs

circuit-debugger

wedsamuel1230/embedded-engineering-skills

Open the skill to read its SKILL.md instructions.

264 installs

arduino-serial-monitor

wedsamuel1230/embedded-engineering-skills

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.

enclosure-designer

wedsamuel1230/embedded-engineering-skills

Use when users need a 3D-printable enclosure for an Arduino, ESP32, or RP2040 project and need help with measurements, cutouts, print settings, or environmental protection.

Frontend & Design175 installs

power-budget-calculator

wedsamuel1230/embedded-engineering-skills

Calculates total power consumption and battery life for Arduino/ESP32/RP2040 projects. Use when user asks about battery life, power requirements, current draw, or needs to estimate runtime. Includes sleep mode analysis, power optimization tips, and battery sizing recommendations. Run scripts/calculatepower.py for accurate calculations.

161 installs

Popular other skills

View category →

hyperframes-cli

heygen-com/hyperframes

The HyperFrames CLI by job - scaffold, check, look at frames, edit the timeline, preview, render locally or in the cloud, publish, project history - plus reading its JSON and recovering from build or render failures.

1.3M installs

triage

mattpocock/skills

Move issues and external PRs through a state machine of triage roles, categorise, verify, grill if needed, and write agent-ready briefs.

1M installs

ask-matt

mattpocock/skills

Ask which skill or flow fits your situation. A router over the skills in this repo.

778.4K installs

to-questionnaire

mattpocock/skills

Turn a decision you can't fully answer into a questionnaire for someone else to fill in.

508.9K installs

wait-what

mattpocock/skills

Stop. That last message did not land: re-pitch it.

459.7K installs

loop-me

mattpocock/skills

Grill me about specs for the workflows I want to build, within this workspace.

447.9K installs