CubeCell LoRaWAN LowPower wake up with external signal

Hallo,

i got my CubeCell and the LORAWan-example (OTAA) worked fine.

Now i want to test the deepsleep (10 μA with LiPo)!

The goal ist to wake up the CPU with an external Signal on a GPIO and send one packet over LoRaWan (TTN) and then go into DeepSleep.

Is there any lowpower-library available like Arduino-lowpower:

https://www.arduino.cc/en/Reference/LowPowerDeepSleep

( LowPower.attachInterruptWakeup())

1 Like

I think Aaron.Lee is making your wish come true, there’s an example he’s added here

Here is the deep sleep and wake up examples:

Hi !

I am using a code, where i collect and send soma data over lora, and end the loop with
lowPowerSleep(1200000);
That is fine.

If I understand the sample code, than it wakes up, and goes back to sleep after a fixed time.
However, what I wisht, that it goes back to sleep after one loop (measuring and sending) is finished.

Normal operation:
wake up, start the loop, end of loop go sleep for 1200000 msec.

Button pushed:
wake up, start the loop, end of loop go sleep for 1200000 msec.

Can you give me directions, how to achieve this ?

In the sample code, removing the timer call from the onWake function:

void onWakeUp()
{
Serial.printf(“Woke up, %d ms later into lowpower mode.\r\n”,timetillsleep);
lowpower=0;
}

then calling onSleep() when you’ve finished doing what you want to do (at the end of your loop) should achieve what you are after.

Thank you very much for your help, I’ll try this method …