'A1' was not declared in this scope

I did some coding yesterday, and left the program working. When I load it up today, I get the error (see title), when I am simply declaring A1 as an input.

void setup(){

  Serial.begin(9600);
  pinMode(A0, INPUT);
  pinMode(A1, INPUT);
  pinMode(A2, INPUT);
  pinMode(A3, INPUT);
  pinMode(A4, INPUT);
  pinMode(A5, INPUT);
}

The variables I use don't even read from any analog values (I am using hard coded test values for now) so I could practically delete this piece of code. Also, by deleting the pinMode(A1) line, the error goes on to pinMode(A2) and so forth till pinMode(A5), but never pinMode(A0) for some reason.

Hi,
Can you please post your complete code?

Also a copy of the error message.

Thanks.. Tom.. :slight_smile:

What do you have selected in the Tools > Board menu?

3 Likes

Oh my bad, I selected the wrong board. Thanks for the help :slight_smile: