int relayPin[] = {1,2,3,4,5,6,7,8,9,10}; //we create an array for all those pins
int delayValue = 100;
void setup() {
//define all pins as output pins
for(int i = 0; i < 10; i++){
pinMode(relayPin[i],OUTPUT);
}
}
// Loops through the pins
void loop() {
for(int i = 0; i < 10; i++){
digitalWrite(relayPin[i], LOW);
delay(delayValue);
digitalWrite(relayPin[i], HIGH);
delay(delayValue);
}
}