#include "Led.h"
const int pin[3]={13,12,7}; //array with the pins where leds are connected
Led myLed[3];
void setup() {
for(int i=0;i<3;i++)
{
myLed[i].pin=pin[i]; //assign each led its corresponding pin
myLed[i].PinAsOutput(); //the pin of each led as output
}
}
void loop() {
for(int i=0;i<3;i++)
{
myLed[i].LedOn(); //each led lights up
}
delay(500);
for(int i=0;i<3;i++)
{
myLed[i].LedOff(); //each led goes off
}
delay(500);
}