Opinion requested: Which way to do this?

Hi all,

I want to make a small device that is battery powered and is always powered, but stays in sleep mode until activated. Then when it’s activated, it should perform the function once, then go back to sleep.

There seem to be two ways to do this, and I would like an opinion as to which is “better” and why (also if there are OTHER ways to do it, please say so). By the way, “power save methods” is the same for both…

Method #1 (pushbutton connected to RESET):

Loop {
    Setup power save methods
    Run function
    Go to sleep
}

Method #2 (pushbutton connected to I/O pin):

Setup power save methods
Setup level sensitive interrupt
Loop {
    Go to sleep
    Await interrupt (pushbutton)
    Run function
}

Opinions and suggestions will be appreciated!

(edit to add): I know method #1 will run the function once at power up - I don’t care about that.

Method #1 (pushbutton connected to RESET):

I doubt that resetting the Arduino when you want it to wake up would qualify as "best" for any definition of best.

I want to make a small device that is battery powered and is always powered, but stays in sleep mode until activated. Then when it’s activated, it should perform the function once, then go back to sleep.

Why does it need to be always powered? How is the device activated? Is it waiting for a button push or some other signal from an external source?

I use a tiny85 in a RF gate entry remote control and the remote control button is really just the power button so 0mA is drawn when not in use. Currently 2+ years old and original batteries.

Plipper.pdf (5.72 KB)