this will be done in your ISR... just check how many secondes the button is pressed since in the ISR, if more than 2 secondes, continue normal operation... case not return to sleep mode.
you need a While loop, a pause, a TimeOut/counter variable, maybe a IF-THEN and that's it... done.
Bookmarks