LowPowerLab Forum

Hardware support => Moteino M0 => Topic started by: MVCutter on September 07, 2019, 06:57:54 PM

Title: Is it possible to wake the M0 by an external interrupt OR via RTCZero lib?
Post by: MVCutter on September 07, 2019, 06:57:54 PM
Basically I'd like a node to report data at a fixed interval, or when it received an external interrupt. My though is to have a node powered by battery with a temp sensor/PIR and it would either report every 5 minutes and sleep, or would wake up and report earlier if there was movement.

Looking at the example sketches there doesn't appear to be both of these functionalities combined anywhere.

Thanks in advance!
Title: Re: Is it possible to wake the M0 by an external interrupt OR via RTCZero lib?
Post by: Felix on September 10, 2019, 10:23:35 AM
Quote from: MVCutter on September 07, 2019, 06:57:54 PM
Looking at the example sketches there doesn't appear to be both of these functionalities combined anywhere.
Sorry I don't have an example of that specific combo, I reckon it must be doable though.
Did you try at all combining them in a sketch?
Title: Re: Is it possible to wake the M0 by an external interrupt OR via RTCZero lib?
Post by: MVCutter on September 10, 2019, 03:52:23 PM
That's good to hear, I had assumed the code would block on either the sleep call or the WFI call which wouldn't allow the other to execute. I will most certainly give it a whirl. My C++ skills are pretty bad though, haha.

Thanks for the response! I'll report back my progress when I have a chance to work through this.
Title: Re: Is it possible to wake the M0 by an external interrupt OR via RTCZero lib?
Post by: andymcl on October 06, 2019, 08:14:23 PM
I'll be interested as I'm trying to do the same thing... unsuccessfully so far.