Findings sleep modes

@manuelmasri i see why yours didn’t end up in a lock up.

From my observation, resuming from deep sleep seems to be running the entire user code again.

I used a flag to control the sleep() to only trigger once but it kept doing it over and over again.

Let me check further.