Author Topic: Is it possible to wake the M0 by an external interrupt OR via RTCZero lib?  (Read 121 times)

MVCutter

  • Newbie
  • *
  • Posts: 7
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!

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 5939
  • Country: us
    • LowPowerLab
Re: Is it possible to wake the M0 by an external interrupt OR via RTCZero lib?
« Reply #1 on: September 10, 2019, 10:23:35 AM »
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?

MVCutter

  • Newbie
  • *
  • Posts: 7
Re: Is it possible to wake the M0 by an external interrupt OR via RTCZero lib?
« Reply #2 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.