This one if press button fast as soon as the program was loaded in arduino memory, or arduino is reseted, it works for 5 secs and stops, and then it does not matter how many times i hit the button again, it is still stuck in * Idle * and nothing happens.
It seem that the 5 secs counter starts as soon as arduino starts running the program and the operation below can not get the result equal or longer than 5 secs like it was suposed to do.
if( (millis() - previousTimeact1) >= PERIODact ) // checks if time after the start is equal or longer than 5 seconds to stop blinking
I guess the timer starts counting 1...2...3...4...5...6...7...8...9...10...infintely, so the program only gets 5 sec once, and then every math operation after, the result value is always higher than 5 sec, and it automatically stays in iddle forever.