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

    want to power off m5stickC from code

    Arduino
    3
    6
    12.5k
    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.
    • P
      pattiuak
      last edited by

      I try these command non of them work.

      • M5.powerOFF();
        when compile i get result "'class M5StickC' has no member named 'powerOFF'"

      • M5.Axp.halt();
        when compile i get result "'class AXP192' has no member named 'halt'"

      • M5.Axp.SetSleep();
        program still running and wifi still on. battery will die in a few hour.

      • M5.Axp.DeepSleep();
        this seem to work but when I press power/reset bnt my program not start it just on the LCD with black color.

      Please help me.
      Thank You.

      1 Reply Last reply Reply Quote 0
      • ajb2k3A
        ajb2k3
        last edited by

        What version of the librarys are you using?
        Have you checked arduino for updates.

        UIFlow, so easy an adult can learn it!
        If I don't know it, be patient!
        I've ether not learned it or am too drunk to remember it!
        Author of the WIP UIFlow Handbook!
        M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

        P 1 Reply Last reply Reply Quote 0
        • P
          pattiuak @ajb2k3
          last edited by

          @ajb2k3 I using arduino version 1.8.9 (windows store 1.8.21 ) and m5stickC library 0.1.0.

          ajb2k3A 1 Reply Last reply Reply Quote 0
          • ajb2k3A
            ajb2k3 @pattiuak
            last edited by

            @pattiuak What M5Stack Core library have you installed?

            UIFlow, so easy an adult can learn it!
            If I don't know it, be patient!
            I've ether not learned it or am too drunk to remember it!
            Author of the WIP UIFlow Handbook!
            M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

            P 1 Reply Last reply Reply Quote 0
            • P
              pattiuak @ajb2k3
              last edited by

              @ajb2k3 It is m5stack library V 0.2.9

              1 Reply Last reply Reply Quote 0
              • T
                tom8787
                last edited by

                In case anyone else is looking for the real PowerOff (and NOT deep sleep or any other sleep method), the command to use is
                M5.Axp.PowerOff();
                (mind the capitals)

                After this command you have to power your M5Stick manually by pressing the power button, but it works as a charm.

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