🤖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?

    Micropython
    2
    5
    12.8k
    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
      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
        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
          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
            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
              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
              • First post
                Last post