New answers tagged timers
1
vote
How to efficiently code a long duration timer
Your posted code will never fail.
See http://gammon.com.au/millis
Let me put it this way. Does your clock "fail" at midnight?
Subtracting the start time from time now always works (even ...
2
votes
How to efficiently code a long duration timer
There are various notions of efficiency, depending on what resource you
want to optimize for. For a battery-powered project, the most relevant
is likely to be energy-efficiency. Then, your code may ...
4
votes
Accepted
How to efficiently code a long duration timer
Should I still be using millis() or is there a more efficient way to create a timer which tracks these longer time periods?
For longer time periods you really should use an RTC. You will get much ...
Top 50 recent answers are included
Related Tags
timers × 429arduino-uno × 131
interrupt × 117
pwm × 47
arduino-mega × 45
programming × 28
atmega328 × 27
millis × 25
time × 24
arduino-nano × 20
library × 17
isr × 17
led × 16
attiny × 16
avr × 15
sensors × 14
arduino-ide × 13
serial × 12
rtc × 12
frequency × 11
c++ × 10
arduino-due × 10
button × 9
lcd × 8
relay × 8