I need help with my engineering project.

I am doing an engineering project for my school and I need to make a light blink when a button is pressed. I have that down but I need to make it do another cycle of blinking when it is currently blinking(I am bad at explaining this I know). So for example if I press the button it will blink 5 times, and on the fourth blink I will press the button again and it will only blink once. What I need it to do is to make it blink 5 times every time I press the button can anyone help me with this??? I also am thinking that I need to do something with the continue function but I don’t know how to apply it properly into the code

EDD_1.ino (1.32 KB)

Please post your code, in code tags

Have a look at how millis() is used to manage timing without blocking in Several Things at a Time. It blinks 3 LEDs.

And see Using millis() for timing. A beginners guide if you need more explanation.

...R

On the second button press just reset a blink counter to 0, so it starts over.