A little bit about the problem I am trying to solve: I am having the arduino execute a number of activities while the button is pushed. Once the tasks have made it to a certain point based on my discretion, I will release the button and the ardunio needs to go to sleep.
As for your question to how I plan to wake the ardunio up, it should wake up when I push the button again. The button should be like a power button.
As for your question to how I plan to wake the ardunio up, it should wake up when I push the button again. The button should be like a power button.
do you have to memorize any state? because then you can just use a button controlling power to the arduino.. when you release the button it won't sleep, will just be off.
if you need to maintain some memory or complete task at hand when you release before going to sleep, then probably easiest way to do so is check at each iteration of the loop the status of the button and if it is released, set up the interrupt to wake up the arduino and go to sleep, and on wake up remove the interrupt.