Why Compiler Errors Are So Confusing
GCC error messages are written for compiler developers, not engineers. A message like "cannot convert 'String' to 'const char*'" tells an experienced C++ developer exactly what's wrong, but for someone learning embedded systems, it's impenetrable.
Common Arduino Errors AI Explains Well
- โธType errors โ String vs char array, int vs long
- โธScope errors โ variables declared inside if blocks
- โธLibrary errors โ missing includes, wrong function signatures
- โธLinker errors โ undefined references, missing implementations
- โธHardware-specific errors โ SPI/I2C address conflicts
How to Paste Errors for Best Results
Copy the full error output, not just the first line. The most useful error is often several lines down. Include the platform (Arduino Uno, ESP32, STM32) and relevant code section.
Beyond Compilation Errors
- โธRuntime errors โ unexpected resets, watchdog timeouts, stack overflows
- โธLogic errors โ "my code compiles but the LED blinks at wrong rate"
- โธSerial output โ garbage on serial monitor instead of sensor readings
๐ก Tip: Every error explanation includes a prevention tip โ understanding why it happened stops an entire class of future bugs.