🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    [Solved]sleep mode on MircoPython?

    Scheduled Pinned Locked Moved Micropython
    5 Posts 2 Posters 15.3k Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A Offline
      akita11
      last edited by m5-docs

      We can use DeepSleep mode on MicroPython as described here:
      https://github.com/loboris/MicroPython_ESP32_psRAM_LoBo

      Is there any way (modules) to handle light sleep mode in MicroPython?
      Other version of ESP32's MicroPython provides machine.lightsleep().
      http://vcc-gnd.com/rtd/html/esp32/quickref.html?fbclid=IwAR3ChQc9samG9iNG9IFTRGypX_zqD43d8QweAeWI5OUKRuCgGxvKaHxDXE8

      m5-docsM 1 Reply Last reply Reply Quote 0
      • m5-docsM Offline
        m5-docs @akita11
        last edited by

        @akita11 Yes, as http://vcc-gnd.com told, use the following code

        import machine
        machine.lightsleep() 
        

        will enter light sleep mode

        M5Stack documentation URL

        https://docs.m5stack.com

        A 1 Reply Last reply Reply Quote 0
        • A Offline
          akita11 @m5-docs
          last edited by

          @m5-docs No, I'm using the newest MicroPython on M5stack, but "machine" has no member of "lightsleep()".

          m5-docsM 1 Reply Last reply Reply Quote 0
          • m5-docsM Offline
            m5-docs @akita11
            last edited by

            Hello @akita11

            Which version are you using? Here's mine.
            0_1557372238970_微信图片_20190509112151.png

            M5Stack documentation URL

            https://docs.m5stack.com

            1 Reply Last reply Reply Quote 0
            • A Offline
              akita11
              last edited by akita11

              @m5-docs Thanks, mine's version is: "MicroPython ESP32_LoBo_v3.2.24 - 2018-09-06 on M5Stack with ESP32", that is distributed for UI flow 1.2.3.
              I burned UI flow 1.3.0-beta, and found machine.lightsleep() is available.

              1 Reply Last reply Reply Quote 0

              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

              With your input, this post could be even better 💗

              Register Login
              • First post
                Last post