int pin[]={2,3,4,5,6,7,8}; void setup() { for(int i=0;i<7;i++) { pinMode(pin[i],OUTPUT); digitalWrite(pin[i],HIGH); } } void loop() { }