I get this error, when I try to compile it. My code begins like so:
#include <EEPROM.h>
const int buttonPin = 2; //pushbutton
byte backlights = EEPROM.read(0);
if (backlights == 0){
int Leds[10] = {3,4,5,6,7,8,13,13,13,13}; // array of the led numbers used, backlights will be turned on in setup()
}
else{
int Leds[10] = {3,4,5,6,7,8,9,10,11,12}; // array of the led numbers used, boot normal
}
int reading;
boolean firstRun;
void setup() {
Why am I getting this error? Am I not allowed to use "if" outside a void?