LowPower - stuck in loop

Hi,

I am trying yp reduce the power consumption of the 328p processor and for that I am using the LowPower library (rocketscream / v1.6).

Now I am running into something interesting and not sure what is causing this. When I call the loop as below for 30 minutes it wakes up correctly and continues the code. However when I set the loop to go to sleep for 60 minutes it never wakes up again. No idea why it behaves like this / seems to get stuck in the loop.

Any ideas or suggestions?

uint8_t mins = 60;
uint8_t i = 0;

while (i < (mins * 7.5)) {
      LowPower.powerDown(SLEEP_8S, ADC_OFF, BOD_OFF);
      i++;
 }

Thanks

Maybe uint8_t is the wrong type to use ? What's it's max possible value? What do you think happens then When you do i++ with i at max value?

Sometimes the answer is so simple .... thanks

:slight_smile: