/*
Schritt 1: eine LED Blink Klasse
https://forum.arduino.cc/t/c-und-klassen-objekte-komisches-verhalten/1317182/9
2024-11-01 by noiasca - based on variable naming of Skee0r1
code not in thread
*/
#include "Led.h"
//LedController leds;
Led leds[] {11, 10, 9, 8};
void setup() {
Serial.begin(115200);
Serial.println("Startup");
for (auto &l : leds) {
l.begin(); // setup HW
l.activate(); // activate blinking
}
// now set some individual values
leds[0].setInterval(3000);
leds[1].setInterval(2000);
leds[2].setInterval(1000);
leds[1].setShineDuration(500);
leds[3].setShineDuration(1000);
}
void loop() {
for (auto &l : leds) l.check();
}