Hello all, and thank you for taking the time to read my question. I'm trying to use my Arduino Uno Wifi Rev.2 to count seconds and to trigger a beep when the time is up. The problem is, I want to do other stuff (like, 22 KB of other stuff) while the timer is counting down. That rules out delay(), but how do I count seconds with other methods?
See Using millis() for timing. A beginners guide, Several things at the same time and look at the BlinkWithoutDelay example in the IDE.
Thank You so much.
You can use TC1 (Timer/Counter 1) of ATmega328P of UNO to count down seconds while the MCU is busy in doing other things.