It seems I am not leaving the interrupt properly, or shall I say entering the program back again from sleep mode.
I am putting tiny to sleep after few seconds, if nothing happens, this works. When sensor is triggered, via interrupt pin, the tiny is worked up, works, however, I am not happy how it works. For example, at the end of the ISR I have hardcoded certain variables, to put the program into that state, all good, but it seems the variable setting just does not work well with my program, where I have left it off , when going to sleep...
So, my question is how to leave the ISR and go to the start of the loop of the program, with clean slate? Something what happens when the whole setup is powered, turned on?
indeed, I would like to get rid of the variables setting that I am using at the moment...
Is it possible to use the "goto" or "rune the setup()" or something similar ?