Thanks for steer ... however still
thinking/brainstorming/trying about how to control multiple LEDs using a single module or class.
The reason is seeking for a solution for my DCCEx project (
see Post #5) to control N LEDs individually, like bufferstops, crossroads, lights etc.
With control, meaning dedicated LED functions like LEDBlinkForTime (let the LED blink for a certain preriod of time), LEDBlinkForCount (let the LED blink N times), LED switch On/Off etc.
Tried creating a
* B4R module which returns a pin to control but returning pin objects is not supported by B4R - a module controlling a single LED is no issue, but then need to create many modules,
* CPP library (testing on an UNO) using the B4R::Timer - BUT the example hangs (see attached) or loops = think messed up with pointers.
next is to try a CPP with timer class based on millis or use a module with fixed number of LED (i.e. 10) as array ... BUT any other ideas appreciated.