Errors in Arduino: Find and fix them

I had to clean a large config file I built and figured I should hit record and explain what I was doing in real time as I fixed any errors I encountered.

Timestamps in the comments (also shown below) show different errors if you’re looking for a particular one. Of course it’s not ALL that might ever occur, but some typical ones for sure.
This Wiki page might be good to have open while watching:
https://github.com/profezzorn/ProffieOS/wiki/Error-messages-in-Arduino-and-how-to-decipher-them.
Hope it helps.

Here’s the description from the YouTube page if you’re just watching it here.


This is verifying a config file full of errors, determining the problems and fixing them in real time.
This is how it goes (all at once) if you don’t verify along the way as you make edits.
There is a good variety of typical errors here, so hopefully it help teach what they mean, their causes, and some troubleshooting methods to find and fix them.
Once the errors become familiar, (and you’re not narrating a video) this process is much quicker.

Yes, my programs are all in dark mode, your color schemes may appear differently.
I highly recommend Sublime Text for editing code. The simple tools available (such as mutiselect) are priceless.

Timestamps for errors encountered:

2:38 - error: wrong number of template arguments
Means an incomplete/incorrect template.
AudioFlicker<> takes 2 colors, such as AudioFlicker<Blue,Red>
If you have AudioFlicker, you have the incorrect number of template arguments.

9:41 - error: expected primary-expression before ')' token
Typically a missing or extra bracket or comma.

11:27 - error: call to non- 'constexpr' function 'StyleFactory'
Caused by similar as previous error, usually means a missing bracket or comma caused a miscount
of blade styles

15:02 - another error: expected primary-expression before ')' token
16:22 - another error: wrong number of template arguments
18:36 - error: invalid conversion from 'int' to 'const char*'
Can be something was found in a place it didn’t belong, like a rogue typo or mis-paste.

19:16 - another error: wrong number of template arguments
21:21 - error: cannot convert 'const char*' to 'StyleFactory'
This is usually a style is missing from a preset, or NUM_BLADES set wrong.
NUM_BLADES, the number of styles per preset, and number of blade definitions in the blades[] array must all be the same amount.

23:10 - similar error: expected primary-expression before '<<' token
23:47 - In instantation of 'OverDriveColor StyleHelper RetType
This one is similar to:
note: candidate: 'RGBA_nod operator>(const RGBA_um_nod&, const RGBA_um_nod&)'
Transparent color found as or in a base color. Bottom-most base color needs to be a solid color (not contain AlphaL)

35:12 - region 'FLASH' overflowed by (some number) bytes
Config file has overflowed memory. Need less presets or more efficient blade styles.
See Saving Memory on the GitHub Wiki:
https://github.com/profezzorn/ProffieOS/wiki/Saving-Memory

3 Likes

Dang, this is some good info! It’s exactly what I needed. Very well done NoSloppy. If its not too much trouble, please hit record anytime you go through processes such as this. Thanks!

2 Likes