#๐Ÿ”’ MicroPython on a Pico - what is "sleep"?

14 messages ยท Page 1 of 1 (latest)

obtuse parrot
#

I'm trying to really understand what machine.lightsleep(), machine.deepsleep() and possibly what time.sleep() means on that device. The official docs and a chatbot are not satisfying my interest in the matter.

tranquil gullBOT
#

@obtuse parrot

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

uncut iris
#

time.sleep is a standard python library that allows your code to stop being processed for certain period of time

#

I'm sure there should be documentation

#

I can't find much documentation on those functions....

obtuse parrot
# uncut iris I'm sure there should be documentation

Yep. I have used time.sleep() before for pausing the logic of some code. A chatbot, with their foibles, suggested looking into that function too when I was diving into the MicroPython's docs in a parallel discussion with it. My primary interest is in power saving and didn't think the time.sleep() would do much to address that interest. But it was put in this thread's original post just to "be sure".

uncut iris
#

ohh light sleep is a function that will make the raspberry goes to sleep mode where it will disable the CPU function to the minimal while keeping the state of the ram

#

deep sleep on other hand will disable everything as much as possible

obtuse parrot
uncut iris
#

I never used those micro computers/micro controllers so idk lol I'm just reading docs

obtuse parrot
#

Appreciate your attention, but I thought my post gave the impression that I was looking for a greater understanding of the sleep functionality than is found in the docs.

obtuse parrot
#

!close

tranquil gullBOT
#
Python help channel closed with !close

This help channel has been closed. Feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.