JayWarne:
I am trying to make a Timer for a project. Using RTC i have set the time and set the update interval to maintain a true time.Now i wish to make Variables or switch cases based on variance between time. i need 24h but to be able to overlap between the days
ie have time periods from 1600 to 0345 so if current time is between this range do this else do nothing
i have no idea on where to start and believe i will have an issue with midnight getting in the way of a simple project.
does anyone know if there is a simple way to do this? Basically after a power outage i need what ever state its in to resume so using time alarms in not ideal.
can it be simple or is it going to be a nightmare?
Simple or nightmare depends on how you approach it. Do you mind answering some questions?
First, what RTC are you using, does it have a battery, and how does it communicate with the microcontroller? Most RTC units use I2C, but I have a DS3234 that uses SPI as well.
Second, what is your circuit doing? Does it turn something on at a certain time, then off at another; or does it turn it on at random times, and run for a specific length of time?
Finally, do you need the precision of an RTC, or can you use 'Arduino timing'?