const int pins[] = {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<(sizeof(pins))/4;i++)
{
pinMode(pins[i], OUTPUT);
}
}
int counter = 0;
void loop() {
for(int i=0;i<(sizeof(pins))/4;i++)
digitalWrite(pins[i], bitRead(counter, i) ? HIGH : LOW);
counter++;
delay(500);
}