Why not sleep, use RTC's square wave output as an interrupt to wake up more often than once a second? Check the time, if not ready to send yet go back to sleep, check again.You have these choices with a DS1307 for example:1 Hz, 1000mS4 KHz, 0.250mS8KHz, 0.125mS32kHZ, 0.03125mS4 KHz seems like plenty, keep track of where you are within the second using that.Wake up increment time interval counter, see of power pulse occurred yet.Waking up every 250uS, or 4000 clocks, I guess you'd stll be sleeping most of the time.
Why not have the receiver timestamp the data? Why does the sender have to do it?
Quote from: Coding Badly on Aug 01, 2012, 10:04 amWhy not have the receiver timestamp the data? Why does the sender have to do it?I guess this could work but if I lost a packet instead of a gap I would have corrupt data.
There are power management libraries which can perform the sleep and maintain the 'millis()' value correctly, which simplifies your sketch.
I have not seen any - the only mode that maintained the millis function was SLEEP_MODE_IDLE when I did some testing.
Quote from: iisfaq on Aug 01, 2012, 10:57 pmI have not seen any - the only mode that maintained the millis function was SLEEP_MODE_IDLE when I did some testing.Have you tried searching? There are quite a few power management libraries around.http://www.engblaze.com/low-power-libraries-for-arduino-control-sleep-with-single-function-calls/
Please enter a valid email to subscribe
We need to confirm your email address.
To complete the subscription, please click the link in the
email we just sent you.
Thank you for subscribing!
via Egeo 16