#include "Led.h"
const int pin[6]={13,12,7, 6, 5, 4}; //array with the pins where leds are connected
Led myLed[6];
void setup() {
for(int i=0;i<6;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<6;i++)
{
myLed[i].LedOn(); //each led lights up
}
delay(500);
for(int i=0;i<6;i++)
{
myLed[i].LedOff(); //each led goes off
}
delay(500);
}