Arduino error: expected unqualified-id before numeric constant

error: expected unqualified-id before numeric constant

This Arduino IDE error blew my mind for a while, come to find out it can be caused from syntax errors. look for a missing semi colon or accidental text at the top of your sketch.

The Error

Thermostat1:1: error: expected unqualified-id before numeric constant
In file included from Thermostat1.ino:9:
d:\Program Files (x86)\Arduino\libraries\SPI/SPI.h:53: error: ‘SPIClass’ does not name a type
d:\Program Files (x86)\Arduino\libraries\SPI/SPI.h:55: error: ‘SPIClass’ has not been declared
d:\Program Files (x86)\Arduino\libraries\SPI/SPI.h:62: error: ‘SPIClass’ has not been declared
d:\Program Files (x86)\Arduino\libraries\SPI/SPI.h:66: error: ‘SPIClass’ has not been declared

 Solution

In my case I seemingly typed a 0 before the intro comment which blew the Arduino IDEs mind.spierror

Cheers!

Leave a Comment