Go Down

Topic: CODE TO CHECK RTC TIME VAYING OR NOT (Read 486 times) previous topic - next topic

AMPS-N

hi,

I need simple code that execute for every 5 minute without delay and millis fuction,when i call the function it will check for whether rtc has been updating time and date or not. if it not updating for more than 5 min add 5 min to previous time.

AMPS

JimboZA

meArm build blog:     http://jimbozamearm.blogspot.com/

Please don't PM for technical advice. Firstly my advice is sometimes wrong, and second, in the forum you get a broader, more timely, range of responses.

AWOL

Quote
I need simple code that execute for every 5 minute without delay and millis fuction,

Use "micros".
Five minutes is 300 000 000 microseconds, so make sure you use an unsigned long ("300000000UL")


And please, stop SHOUTING.
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Groove

Have a look at the blink without delay tutorial, and substitute "micros()" wherever it says "millis()", and multiply the interval by 1000.
Per Arduino ad Astra

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy