Hello,
The µc shall sleep all the time, unless the button is pressed, then there should be an output on the serial console. After that i want to let him sleep again.
But it doesn't work.. why?
Can you help me?
The Output is:
..running!
before
after
before
after
before
after
before
after
before
after
before
after
.
.
.
an pressing the button takes no effect
void setup()
{
Serial.begin(9600);
delay(3000);
Serial.println("..running!");
Serial.println();
pinMode(P1_3, INPUT_PULLUP);
attachInterrupt(P1_3, awake, FALLING);
}
void loop()
{
Serial.println("before");
LPM4; // start in ultra low power mode, all work is done in the ISR routines
Serial.println("after");
}
void awake(void)
{
delay(100);
Serial.println();
Serial.println("Awake!");
}
i've used a fresh install of energia 0101e00013