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

    Is there a deep sleep mode for Fire?

    M5Stack Fire
    2
    4
    7.3k
    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.
    • H
      houkensjtu
      last edited by

      Hello all,

      I'm designing a Fire application which is supposed to be work on battery, and it will be beneficial if I can deep sleep Fire when it's not being used. Is there a way to "Sleep" the unit? Or what's the most common way to reduce power consumption?

      Thank you!

      1 Reply Last reply Reply Quote 0
      • felmueF
        felmue
        last edited by

        Hello @houkensjtu

        yes, there is. Two functions are available for that POWER::lightSleep() and POWER::deepSleep()

        Also have a look at the sleep example, it uses light sleep and deep sleep functionality.

        Cheers
        Felix

        GPIO translation table M5Stack / M5Core2
        Information about various M5Stack products.
        Code examples

        1 Reply Last reply Reply Quote 0
        • H
          houkensjtu
          last edited by

          Hi Felix,

          Thank you for you quick answer. Looks like you're referring to the Arduino library of M5Stack.
          I wonder if there is an equivalent function in UI-FLOW? I'm currently using UI-Flow to program my Fire.
          I can also try to burn the Arduino firmware, but I'm worried if I can control the UI as easily as in UI-Flow.

          Thx,

          1 Reply Last reply Reply Quote 0
          • felmueF
            felmue
            last edited by

            Hello @houkensjtu

            ok, I see. In UI-FLOW you could use an Execute code block and add something like this for deep sleep:

            import machine
            
            #sleep for 10 seconds
            machine.deepsleep(10000)
            

            or light sleep:

            import machine
            
            #sleep for 10 seconds
            machine.lightsleep(10000)
            

            BTW: I found a nice tutorial about MicroPython and sleep modes here.

            Cheers
            Felix

            GPIO translation table M5Stack / M5Core2
            Information about various M5Stack products.
            Code examples

            1 Reply Last reply Reply Quote 0
            • First post
              Last post