Ok, now that wasn’t the most productive weekend, or Monday. I still tried the motion sensors to determine when it is time to go to sleep and when to wake up together with BLE communication because I have other uses for it. It took some time, but it worked nicely. Nevertheless, for such a coin cell powered application where all I want to do is (briefly) send which button has been pushed when one is pushed and then go back to sleep, I wanted to do wake up → advertise (specifically a beacon where I placed the button number) → return to sleep after a prescribed time has passed. But I had not considered an important aspect of deep sleep, which is that on waking up it starts all over. It’s probably plain that I am relatively new to all this, but what I learned about using interrupts was that they are supposed to communicate to the main code using volatile variables. That doesn’t work in the waking up scenario when it starts from a reset. So my question is, is there a way to determine that the device woke up due to an external interrupt and where it came from? I searched but I didn’t find an answer (or did but failed to realize it). Because if there isn’t, I will have to try my luck with system ON sleep. I already read the thread today and found that my battery pins mistake was actually discussed there.
Regards,
Daniel