int ledpins[7] = {13,12,11,10,9,8,7};
int index = 0 ;
void setup() {
// put your setup code here, to run once:
for (int x = 0; x < 7; x++)
{
pinMode(ledpins[x], OUTPUT);
}
}
void loop() {
// put your main code here, to run repeatedly:
if (index == 7)
{
index = 0;
}
digitalWrite(ledpins[index], HIGH);
delay(500);
digitalWrite(ledpins[index], LOW);
index++;
}