Responding to buttons in sleep mode

I have a requirement to reduce power consumption as we’ll be using solar and small battery to power our electron devices in the field.

Accordingly I plan to use sleep mode.

I also need to be able to handle user input and tamper switch activation.

My plan was to put the device in sleep mode at the appropriate time and only wake up on 2 either of two conditions:

  1. User presses the wake-up button
  2. The tamper switch inside the case is activated

But I guess I can only have a single pin to trigger wake from sleep?

Is there a way I can wake the device from 2 (or more?) triggers?

This feature is planned but currently you’d need to build your own OR crictuitry (e.g. via diodes).

1 Like

Thanks.
I’ll park tamper detect, waking up on user button press is fundamental to how the product will work and reducing power consumption is more important than knowing if the case was opened for now.

@crux_lou, there is a current Pull Request to add multi-interrupt wake, so it’s in the pipeline!

2 Likes

Great.

For now our device is in prototype stage, tamper detection is for when we’re shipping these things out to places they might get unwelcome attention.

We have some time before that happens.

@peekay123 - a quick glance at the PR makes me think that while I’ll be able to wake my device with much more granularity, I won’t know which pin caused it to wake without extra circuitry?