Pages: [1]   Go Down
Author Topic: CODE TO CHECK RTC TIME VAYING OR NOT  (Read 331 times)
0 Members and 1 Guest are viewing this topic.
DELHI
Offline Offline
God Member
*****
Karma: 0
Posts: 601
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

Logged

AMPS

Johannesburg UTC+2
Offline Offline
Faraday Member
**
Karma: 60
Posts: 3242
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Noted

 smiley-cool
Logged

Have you looked for answers in the Learning, Reference, Products and Playground tabs on http://arduino.cc/en/ ?
Look here http://electronicsclub.info/ for basic electronics

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 238
Posts: 24370
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

"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.

UK
Offline Offline
Faraday Member
**
Karma: 16
Posts: 2883
Gorm deficient
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Per Arduino ad Astra

Pages: [1]   Go Up
Jump to: