I am a bit stuck for words - so I guess that is why I am not getting any progress - how to explain this exactly, but here goes:
Scenario:
5 second time frame.
There are 5 messages to send depending on input.
Say 1
is active and 0
is clear.
All conditions are clear.
Some confusion on how to handle this. Constantly send 5 clear messages over and over, or sent 5 clear messages once and if they are still clear: just wait.
If any of the messages are active that message's place is set to active and so the messages are repeatedly sent.
eg: say number 1 is active the output would look like:
1,0,0,0,0 (five seconds) 1,0,0,0,0 (five seconds) 1,0,0,0,0
Then if number 3 also becomes active the output would change to:
1,0,1,0,0 (five seconds) 1,0,1,0,0 (five seconds) 1,0,1,0,0
Clear?
Now, the 1
shown in the example would not be a simple 1
.
It is an rgb
message. But to get the idea I simplified it to just a simple 1
.
What's going on and why?
Well I have an RGB LED and want it to show up to 5 notifications.
If the LED just shone constantly with a colour (depending on the condition) and another condition becomes active, how would I show this?
Adding the colours together can be problematic.
So I thought if I allocated 5
seconds (could be 4, but....) then it sends the RGB message to set that colour for that condition for 1/5'th of the time, then for the other parts (which are either off or active) those different messages are sent for their 1/5'th of the time, the LED would blink the different colours.
It's going to get bigger too.
Yes, that is ONE of the RGB LEDs.
There are a few of them and they ALL have this possibility.
So it needs to be modular (self contained) so each LED would have it's own table of which condition is active and which isn't.
Then, as mentioned at the start, if all are clear does it send one cycle of turning all LEDs off then stop?
Someone - please?
But please keep me in the loop when doing it as I am sure I didn't explain it the best and if you do it all, something I didn't explain could throw a spanner in the works.