user59414: I am trying to have my Arduino wait in a low power idle state given by the LowPower library made by rocketscream on an Uno. However, when I try to have it wait for 8 seconds, it seems to not pause at all. Does anyone know how to make it so it waits the full 8 seconds before running the next line of code?
Here is the code:
#include "LowPower.h"

void setup() {
   Serial.begin(9600);
}

void loop() {
   delay(100);
   Serial.println("above");
   delay(100);

   LowPower.idle(SLEEP_8S, ADC_OFF, TIMER2_OFF, TIMER1_OFF, TIMER0_ON, SPI_OFF, USART0_OFF, TWI_OFF);

   delay(100);
   Serial.println("below");
}

I would expect this to print "above", then wait 8 seconds, then print "below",  then do it again. But what happens is it runs right through the LowPower.idle without doing anything and the output looks like:

1:12:14.547 -> above
21:12:14.746 -> below
21:12:14.845 -> above
21:12:15.044 -> below
21:12:15.144 -> above
21:12:15.376 -> below

...and so on.
If anyone has any ideas on how to make idle wait, that would be great.
Thanks!

user63401: FYI, this issue was brought up nearly 3 years ago, with no response from the author:  https://github.com/rocketscream/Low-Power/issues/36

59414: <p>I am trying to have my Arduino wait in a low power idle state given by the LowPower library made by rocketscream on an Uno. However, when I try to have it wait for 8 seconds, it seems to not pause at all. Does anyone know how to make it so it waits the full 8 seconds before running the next line of code?</p>
<p>Here is the code:</p>
<pre><code>#include &quot;LowPower.h&quot;

void setup() {
   Serial.begin(9600);
}

void loop() {
   delay(100);
   Serial.println(&quot;above&quot;);
   delay(100);

   LowPower.idle(SLEEP_8S, ADC_OFF, TIMER2_OFF, TIMER1_OFF, TIMER0_ON, SPI_OFF, USART0_OFF, TWI_OFF);

   delay(100);
   Serial.println(&quot;below&quot;);
}
</code></pre>
<p>I would expect this to print &quot;above&quot;, then wait 8 seconds, then print &quot;below&quot;,  then do it again. But what happens is it runs right through the LowPower.idle without doing anything and the output looks like:</p>
<blockquote>
<p>1:12:14.547 -&gt; above</p>
<p>21:12:14.746 -&gt; below</p>
<p>21:12:14.845 -&gt; above</p>
<p>21:12:15.044 -&gt; below</p>
<p>21:12:15.144 -&gt; above</p>
<p>21:12:15.376 -&gt; below</p>
</blockquote>
<p>...and so on.</p>
<p>If anyone has any ideas on how to make idle wait, that would be great.</p>
<p>Thanks!</p>
 63401: <p>FYI, this issue was brought up nearly 3 years ago, with no response from the author:  <a href="https://github.com/rocketscream/Low-Power/issues/36" rel="nofollow noreferrer">https://github.com/rocketscream/Low-Power/issues/36</a></p>
