2021-01-27 07:02 AM
The point is that when you press a button, an LED should flash three times.
If you press the button again while it is flashing, the LED must flash 3 times again.
The whole thing should be implemented without blocking code.
I could could use a loop to make the LED blink 3x, but then I would have implicit blocking code in there again.
How can I implement this without blocking code?
2021-01-27 07:16 AM
Set up a timer to flash the LED with PWM and set the repetition counter accordingly. Start the timer as one short.