Prior to using the timer you need to reset it using timer=millis(); every time
You forgot this twice
Does it work now?
If not please post your entire code
Prior to using the timer you need to reset it using timer=millis(); every time
You forgot this twice
Does it work now?
If not please post your entire code