I thought I had posted this already but can't find it any where. I have read Gammons POWER_DOWN and WAKE UP and have a fairly good understanding of it for someone new to Arduinos. I have a couple questions that I haven't found answers for through lengthy searches on this forum, the web and youtube.
Components are a DS3231 RTC, a bare/breadboard ATMega 328P-PU and an Adafruit FX Sound module.
I can recreate a (if HH ==X) POWER_DOWN and (if HH == Y) WAKE. At given times. Example: turn on a LED at 7:00 pm and turn it off at 4 am. not a big deal.
I can also POWER_DOWN for 25 seconds, activate the sound board (play a tune) and POWER_DOWN over and over again. non stop
What I am having trouble finding an answer to is this. Is it possible, using (1) RTC. to put this 328 in POWER_DOWN mode from say 6:00 am to 6:00 pm. It doesn't need to do anything for half a day.
at 6:00pm I would like it to WAKE UP and run a simple loop. The catch is it has to also power down inside the loop. So, 25 seconds POWER_DOWN, wake up for (5) seconds play a track from the FX sound board, POWER_DOWN and repeat.
It needs to run the loop till 6:00 am. THEN it needs to POWER_DOWN/sleep the rest of the day.
An important part of the question to take into consideration is: you never know what time the device will be turned on. It could be while it is supposed to be asleep, or it could be when it is supposed to be awake running the loop. There is however "the clock". is the Arduino smart enough to know which segment it is in?
Another important part of the question is: there are delays involved. so another question is: if the "go to sleep for the day" happens during a delay, is it possible it will be missed? OR, is there a way in which you can call. "IF" and leave a window of time in the event that the "go to sleep happens to land during one of those delays? like say between a 6:00 and 6:15 time stamp?
these are as straight forward as I can word them and would think they are either YES or NO answers. I read some where, ask a good question, get a good answer.
NO, I don't have code to provide you or an explanation of my project because at this point I don't know if what I would like to accomplish is even possible and the reason why I have tried to articulate the questions in a relatively simple manner. I am simply looking for feedback as to whether or not I am trying to accomplish something that the Arduino is capable or incapable of doing. The WDT is not an option. It requires a few extra mA's.
any input is appreciated, considering the complexity and my lack of skill. hope everyone has a Merry Christmas.
Thanks, Fred