Arduino Troubleshooter


        
 
Type of Problem/Error:
Problem or Error Message:


Error Code: 1
Type of Problem/Error: Compile Time
Problem or Error Message:

  • expected ';' before
  • expected ',' or ';' before...

Possible Solutions:

You probably forgot to put a semicolon at the end of the line directly above the line indicated by your error message.
Video Explanation

Tags: ##tags##


Error Code: 2
Type of Problem/Error: Compile Time
Problem or Error Message:

...was not declared in this scope

Possible Solutions: You probably mispelled a command or variable name. Common examples include:

  1. 'pinmode' → pinMode (the M must be capitalized)
  2. 'digitalwrite' → digitalWrite (the W must be capitalized)
  3. If you declare a variable as redLED, then you must always refer to it the exact same way. redled or redLed will result in this error.
  4. Every letter in the Arduino constants used to set pins HIGH and LOW must be capitalized.

Tags: ##tags##


Error Code: 3
Type of Problem/Error: Compile Time
Problem or Error Message:

stray '\###' in program

Possible Solutions: Arduino only understands English. You typed something in another language. For example, stray '\357' means you typed a Chinese comma or semicolon.
Tags: ##tags##


Error Code: 4
Type of Problem/Error: Compile Time
Problem or Error Message:

expected initializer before...

Possible Solutions: You are probably missing an opening curly brace above the line indicated by your error message. For a more detailed explanation and a handy trick you can use to help find where to put the missing curly brace, see the video explanation.
Tags: ##tags##


Error Code: 5
Type of Problem/Error: Compile Time
Problem or Error Message:

a function-definition is not allowed here before '{' token

Possible Solutions: You are probably missing a closing curly brace above the line indicated by your error message. For a more detailed explanation and a handy trick you can use to help find where to put the missing curly brace, see the video explanation.
Tags: ##tags##


Error Code: 6
Type of Problem/Error: Compile Time
Problem or Error Message:

...does not name a type

Possible Solutions: You probably tried to declare a variable but forgot indicate the type. Is it a byte, an int, or maybe a String?
Tags: ##tags##


Error Code: 7
Type of Problem/Error: Compile Time
Problem or Error Message:

expected ')' before...

Possible Solutions:
  1. You may be missing a closing parenthesis before the line indicated in your error message.
  2. If you see another error below this one that says too few arguments to function you are probably missing a comma between two or more arguments that are needed when calling a function. For example:
    digitalWrite(yellowLED, LOW);
Tags: ##tags##


Error Code: 8
Type of Problem/Error: Compile Time
Problem or Error Message: expected constructor, destructor, or type conversion before '(' token
Possible Solutions: Video Explanation
Tags: ##tags##


Error Code: 9
Type of Problem/Error: Connection
Problem or Error Message:

programmer is not responding

Possible Solutions:

If you are programming an Arduino Nano:

  1. Make sure the Processor (Tools menu) is set to use the Old Bootloader.


If you are programming an ATtiny84:

  1. Did you plug your ATtiny84 into the programmer backwards?
Tags: ##tags##


Error Code: 10
Type of Problem/Error:
Problem or Error Message: could not find USBtiny device
Possible Solutions:

If you are trying to program an ATtiny84, make sure you have select the Arduino as ISP Programmer from the Tools menu.

Tags: ##tags##