Looking for examples of error messages to improve.

On the developers mailing list, Mike Nelson had the great suggestion that we improve some of the error messages generated when you compile your sketches. Right now, they come straight from the underlying compiler and can be hard to understand, especially for beginners. In order to improve them, however, we need to know which errors you're seeing and what's causing them.

So please, next time you get an obscure error message, reply to this post with:

  • the text of the error message
  • the complete source code of your sketch, or, even better, a smaller sketch that gives the same error
  • any other information, like what you did to fix the problem, what message would have made more sense to you, etc.

If we can identify some common errors and their causes, that would be a great start towards providing more useful error messages. All examples appreciated.

I have seen questions about ‘scope’ errors crop up a few times on various threads. I could almost hear the poster saying to himself after the error was explained: “if the compiler can’t find a proper declaration for this variable, why didn’t it just say so”

Error1 could have a statement suggesting a check that a variable with [name] is declared with the correct spelling. A link to a simple overview on variable scoping would help for error1 and error2

int somevariable;

void setup(){

void loop(){
  somvariable = 2; //error1: 'somvariable' was not declared in this scope
  for(int i =0; i < 1; i++)
   i++ ;   // error2: name lookup of 'i' changed for new ISO 'for' scoping      

How about the

Could not determine program size

that comes up in red, but doesn't mean the upload was unsuccesful.

That would be the first one I would vote for