//int led1 = 2;
//int led2 = 3;
int led[]={2,3,4,5};
// the setup function runs once when you press reset or power the board
void setup() {
// initialize digital pin LED_BUILTIN as an output.
for (int i=0;i<=3;i++){
pinMode(led[i], OUTPUT);
// pinMode(led2, OUTPUT);
}
}
// the loop function runs over and over again forever
void loop() {
for (int i=2;i<=3;i++){
ledBlink(led[i],500);
//ledBlink(led2);
}
}
void ledBlink(int p, int t){ //p LED pin number, t time for the blink
digitalWrite(p, HIGH); // turn the LED on (HIGH is the voltage level)
delay(t); // wait for a second
digitalWrite(p, LOW); // turn the LED off by making the voltage LOW
delay(t); // wait for a second
}