I have an annoying error that I just can't figure out. A forum search didn't help as my search terms returned too many results
I've stripped this down to a few lines of code that don't work though they read like they should work just fine really
void setup() {
// declare an array of bytes
byte Red1[]=
{
B00000011,
B00000110,
B00001100,
B00011000,
B00110000,
B01100000,
B11000000,
B10000001
};
byte c = 0;
c = Red1[2]; //<---- this compiles fine here
}
void loop() {
// put your main code here, to run repeatedly:
c = Red1[2]; //<--------- this same line gives a compiler error now
}
mas.ino: In function 'void loop()':
mas:26: error: 'c' was not declared in this scope
mas:26: error: 'Red1' was not declared in this scope
I'm sure I saw this problem before and it was something to do with pointers? But I don't quite recall......