Page 1 of 1

Xadow sleep mode

Posted: Tue Sep 22, 2015 4:39 am
by pizzic
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,

Re: Xadow sleep mode

Posted: Wed Sep 23, 2015 4:57 am
by pizzic
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.

Re: Xadow sleep mode

Posted: Wed Sep 23, 2015 4:36 pm
by viswa
Thanks for updating. This information will be useful to the community.