Long wait between events

All,
A While loop will loop continuously until the expression inside the
the parenthesis () is false. In my sketch I 'm comparing a relay turn on
Date/Time (unix time) to Date/Time of Day (unix time). The While loop will be in a loop for as long as 21 days (time between events).
During the 21 day loop time I would like to display Date/Time on a LCD. I don't think you can make the Arduino uno do two things at one time. Has anyone run across this in their sketch? If so how did you solve the problem.I'm using an array to hold the event start Date/Times.

john
Mims, Fl.

Don't use a while loop. The loop() function will do what you want

Two things you do not use in "real world" programs.

  • delay()
  • while()