Waking up Electron from sleep using Pin and SMS


I have an electron that i need to wake up based on a pin interrupt e.g. D2 and also have the some option to wake up using SMS. I am trying to useSystem.sleep(wakeUpPin, edgeTriggerMode, SLEEP_NETWORK_STANDBY);But problem here is that i can only specify one pin either D2 or RI_UC in this function. The idea is to have local and remote wake up option (via SMS). Separately they both work great. but how to specify two separate pins for the same wake up function. Any suggestions?

Putting an Electron to Sleep until a condition is met

You are using a non-particle SIM to receive SMS messages correct?

The RI_UC pin is not accessible via any external pins right?


Yes i’m using a 3rd party Sim. Sadly, i think so you are right RI_UC pin is not physically available otherwise i could have wired it.

So the question is is there a way we can specify two different pins as wakeUpPin in below function. That will allow for a local D2 pin interrupt and RI_UC interrupt for following;

iSystem.sleep(uint16_t wakeUpPin, uint16_t edgeTriggerMode, SLEEP_NETWORK_STANDBY, long seconds);

Or unless there is a way to assign RI_UC a physical pin through low level programming, that might also work.


@haroon.rehman, referring back to an older post by @mdma, try attaching an interrupt the pin you want to wake with. The STM32 will wake to any EXTI interrupt so give that a shot and let me know what happens. :smile:


Recently I did come back to a project that would have needed that but unfortunately it seems things have changed since.
I tried a parallel wake on SMS with a wake on pin under 0.7.0-rc.3 and it didn’t work.

Unless someone can spot my mistake and point me to it - I’d be grateful.