Xadow sleep mode

Hi.

I’m running the following code on Xadow:

void setup()
{

Serial.begin(9600);
while(!Serial.available());
Xadow.init();

delay(2000);
Serial.println("Init over");

}

void loop()
{
Serial.println(“Sleeping”);
delay(1000);
Xadow.pwrDown(4000); // sleep for 1000ms
Xadow.wakeUp(); // wake up
Serial.println(“Wake”);
delay(1000); // delay 500 ms

}

The problem is that on the output I have:

Init over
Sleeping
Wake
Sleeping

It looks like it runs one time and then it hangs…any ideas?

Thanks,

OK, I found the problem:

all is working fine, the problem is the serial monitor: when the processor go into sleep mode, it shuts down also the serial. When it wakes up, the serial port is re-opened and the IDE serial monitor must be close and re-opened.

If you put a pause just after the wakeup, and you close and re-open the monitor, you should see the Wake.

Thanks for updating. This information will be useful to the community.