I put my arduino to sleep with the codes below and it is not accurate. For example, I program my arduino to sleep for 12 hours and it wakes up after12 hours and 15 minutes.
can it wakeup exactly 12 hours
- why do we divide 43200 / 8s ?
// 12 hours = 60x60x12 =43200 s
// 43200 s / 8 s = 5400
unsigned int sleepCounter;
for (sleepCounter = 5400; sleepCounter > 0; sleepCounter--)
LowPower.powerDown(SLEEP_8S, ADC_OFF, BOD_OFF);