int mypin[] = {2,3,4,5,6,7,8,9,10,11};
void setup() {
// put your setup code here, to run once:
for (int i =0; i<=10; i++)
pinMode(mypin[i], OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
for (int i =0; i<=10;i++)
{
flash(mypin[i], 20);
}
}
void flash(int pin, int duration)
{
digitalWrite(pin,HIGH);
delay(duration);
digitalWrite(pin, LOW);
delay(duration);
}