Looped Timer with display

Hey all,
Working on something here and part of it calls for a routine to be run every x seconds. . (in reality, it will end up being somewhere around 15 minutes or so). This routine needs to be timed as well, also to x seconds (again in reality, probably 1 min 30 secs or there abouts).

I need to have the LCD displaying the 'time until next cycle', counting down in seconds (or mins:secs but this project won't have a RTC so probably just keep it in seconds?).

When the cycle is run, it needs to switch on an output, monitor an input (which will end the sequence early if the input changes state) and display the 'elapsed time' on the LCD.

Has anyone done anything similar or know of a library which will get me close?
I have seen a couple of Timer libraries which can handle the simple "every 15 minutes, turn the output on" part, but displaying the 'time until next' and the 'elapsed time' and handling the input to exit the cycle early are what's got me stuck.


Have you looked at the 'blink without delay' example. Once you understand how it works, you will be able to use the same concepts for everything you need to do here.

This library will simplify your code too.