Hi everyone, i'm pretty new and i'm trying to make 9 LED's all flash at once. Is there a way to specify a voidsetup() to a scope, or is there a way to delete the variable at the end of a scope? here is an example of my program
void setup()
{ int yellowled = 2;
pinMode (yellowled, OUTPUT);
digitalWrite(yellowled, HIGH);
delay (1000);
digitalWrite(yellowled, LOW);
delay (1000);
}
void setup()
{int yellowled = 3;
pinMode (yellowled, OUTPUT);
digitalWrite(yellowled, HIGH);
delay (1000);
digitalWrite(yellowled, LOW);
delay (1000);
}
void setup()
{int yellowled = 4;
pinMode (yellowled, OUTPUT);
digitalWrite(yellowled, HIGH);
delay (1000);
digitalWrite(yellowled, LOW);
delay (1000);
}
void setup()
{int yellowled = 5;
pinMode (yellowled, OUTPUT);
digitalWrite(yellowled, HIGH);
delay (1000);
digitalWrite(yellowled, LOW);
delay (1000);
}
void setup()
{int yellowled = 6;
pinMode (yellowled, OUTPUT);
digitalWrite(yellowled, HIGH);
delay (1000);
digitalWrite(yellowled, LOW);
delay (1000);
}
void setup()
{int yellowled = 7;
pinMode (yellowled, OUTPUT);
digitalWrite(yellowled, HIGH);
delay (1000);
digitalWrite(yellowled, LOW);
delay (1000);
}
void setup()
{int yellowled = 8;
pinMode (yellowled, OUTPUT);
digitalWrite(yellowled, HIGH);
delay (1000);
digitalWrite(yellowled, LOW);
delay (1000);
}
void setup()
{int yellowled = 9;
pinMode (yellowled, OUTPUT);
digitalWrite(yellowled, HIGH);
delay (1000);
digitalWrite(yellowled, LOW);
delay (1000);
}