Sparki Delays

Hi guys

I am wondering what the longest delay is any of you guys have used?

I’m currently using a 100000 delay repeated 6 times for a ten minute delay overall.

I have an idea that if you could allow Sparki to be delayed all night (say 8 hours) then you could use him as an alarm clock. I have written a code that uses Sparki as a snooze alarm ( as in the ten minute interval after you turn off your original alarm and lie in bed looking at the ceiling, your smartphone or dozing). Which is pretty cool and works well but it would be awesome if Sparki could be my new alarm clock :slight_smile:

But I think a 28,800,000 delay might be a bit long…what do you think?


Delay uses an unsigned long:

Which for Arduino, because it uses 32 bit longs, is 4,294,967,295:

So, theoretically, you can go up to:
4,294,967,295 milliseconds /1000 milliseconds per second ~= 4,294,967 seconds
4,294,967 seconds/ 60 seconds per minute ~= 71582 minutes
71582 minutes / 60 minutes per hour ~= 1193 hours
1193 hours / 24 hours ~= 49 days

So, seems like that’s fine!

Wow that’s epic
Going to test it tonight
I’ll set the normal alarm just in case :smiley:
Thank you