ghubcoder
ghubcoder
@ms1963 Hi there, how are you connected from the mac to the pico, I'm assuming via USB? I've seen that the USB behaves strangely when sleeping, it doesn't seem to...
@RayNieport Try removing this line: https://github.com/ghubcoder/PicoSleepDemo/blob/55b557218fcb22b67c441b362d1c8fae0c4a5605/main.c#L53 For me at least that stops it from hanging. Other wise it hangs after 3 sleep cycles.
Hi @kjm1102 thanks for having a look at the code. I've had a quick look at this, I couldn't find anything for micopython around this after an initial look (...
@kjm1102 I've had a look at recompiling micropython to support this, please see [here](https://ghubcoder.github.io/posts/deep-sleeping-the-pico-micropython/)
Hi @kjm1102 glad you got it working! Yep as you found with this you need to put it inside a loop. `machine.deepsleep()` as the docs state must reset the device...
@capnf which code are you getting that with? Is that with the micropython uf2 file?
Great thanks @capnf I will take a look at what might be going on there.
@capnf I've uploaded a new release which should fix that [here](https://github.com/ghubcoder/micropython-pico-deepsleep/releases/tag/v1.1-pico-deepsleep) If you could give it a test when you get a moment that would be much appreciated.
Brilliant, thanks for checking. You were right with your hunch, it was overflowing. The type used was `int8_t`, max value 127. Now it's using `uint32_t`, max value 4,294,967,295 which I...
That's really good to hear you know 🙂 I'm glad this little experiment has been useful for someone else and will be put to good use. Thanks for raising the...