After I run a program, I want my timer to start. Currently I am using millis()/1000 just for the seconds but I want to make the timer so that it gives the minutes too. I know how to display it but i just need to know how i can make the millis update every 60 seconds so it goes back to 0. Thank you.
60 seconds = 6000 milliseconds so divide your milliseconds by 1000. Note you could take the modulus of millais ie if(millis%1000==0)doSomething(= but note you will have to take the starting time away or the initial time the button was pressed.
Would you happen to know how I would be able to include the milliseconds too? Not just the full milliseconds, the second or second and third value of it? Because m/1000 gives seconds but m/100 wouldn’t give me what I want.
If I may explain further. For example: millis() = 1234.
The 1 is the seconds, the 2 is how fast the 1 changes, the 3 is how fast the 2 changes etc correct/? I would just like to obtain the value of 2.