error: 'byte' does not name a type

If this error message is shown just calm down; some 5,000 people were asking online what this means and what can be done to solve it.

Checkout this:

//float f;

#if defined(asd)
   int i = 1;
   long l = 2;

char c = 3;
byte b;

void setup() {

void loop() {

If you try to compile this most probably you will get the error message 'byte' does not name a type.

Well, if you remove the "byte b" declaration eventually you get "undefined reference to `setup'" and "undefined reference to `loop'.

Don't worry: just do any kind of valid declaration on top of your source like

      float f;

and the error messages will disappear.

Why? No idea. Ask Massimo.

contact: nji(at)