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

    Scheduled Pinned Locked Moved M5Stack Fire
    4 Posts 2 Posters 8.8k Views
    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 Offline
      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 Offline
        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 Offline
          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 Offline
            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

            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