Hi, I am trying to use the Sleep_n0m1 library on Nano to put the processor to sleep:
#include <Sleep_n0m1.h>
Sleep sleep;
void setup()
{
Serial.begin(9600);
}
void loop()
{
Serial.println("wake");
Serial.println("sleep");
sleep.sleepPinInterrupt (2, FALLING);
// sleep.pwrDownMode();
// sleep.sleepDelay(2000);
}
As written, I would expect the processor to go to sleep and never wake up.
However, with sleepPinInterrupt() and pwerDownMode(), the processor never seems to go to sleep, i.e. the there is a constant "sleep ... wake" output on Serial.
SleepDelay() appears to work, i.e. there is a 2 sec delay between "sleep" and "wake" in the output.
Any suggestions, why this doesn't work as expected?
(Note, I am aware of <avr/sleep.h> but am trying to keep it simple ... if possible.)
Thanks !!