Remember state of buttons and blink led.

Hello
I wanted to make a program remembers presses and releases the button for the user, and played back turning on and turning off the LED with a one second delay.
I have no idea how to do this. Any help will be appreciated. :slight_smile:

It is not easy for a beginner.
Basically you need to record the time that the LED got turned on and off using the number you get from the millis() function. Then you need to store that in a buffer or area of memory you can get when you define an array.
The number you store in the array is not the millis() number but that number plus the number of milliseconds you would like it repeated.

Then another part of the code looks at the numbers in this array and sees if the time now given by millis() exceeds that of your stored number, if it does then turn the LED on. The same goes for off.

Follow that?