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

    M5Stick C Plus - Using button A to wakeup the device?

    M5 Stick/StickC
    3
    4
    4.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.
    • L
      LBP of MO
      last edited by

      I am using the M5Stick C Plus to send a MQTT command. Currently I have it programmed to send the command and then power off. If I understand correctly it is actually going into deep sleep mode.

      If I use the power button on the side it wakes up and sends the MQTT command. This gives me great battery life.

      Is it possible to use button A to perform this task as it is much easier to press than the little buttons on the side?

      I could not find a "power on" in UiFlow.

      My other option is to 3d print a simple sleeve that would make the side button larger / easier to press.

      Thanks!

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

        Hello @LBP-of-MO

        when you use the power off block everything (including ESP32) gets powered off. From that state the device can only be powered on again via the little button (power button) on the side (or when USB is plugged in). In other words, no, button A cannot be used to power on the device.

        Thanks
        Felix

        P.S. Deep sleep is a low power mode of the ESP32 and requires the ESP32 to stay powered on. However deep sleep is not available via UIFlow blocks afaik. Also please note: an M5StickCPlus with its ESP32 in deep sleep mode consumes a lot more energy than when it is fully powered off.

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

        W 1 Reply Last reply Reply Quote 0
        • W
          wsanders @felmue
          last edited by

          I tried calling machine.deepsleep(xxx) in UIFlow and all it did was lock up the device, so tightly that even the power/reset button did not work. It might work from other IDEs , if you could succeed in setting up all the interrupts before putting it to sleep.

          1 Reply Last reply Reply Quote 0
          • L
            LBP of MO
            last edited by

            We 3D printed a sleeve that makes the M5 both wearable as a lanyard and allows the power button to be easily pressed.

            Our customers use the M5 to send a MQTT command that briefly changes the content on a TV from cable/satellite programing to their own internal marketing images and videos.

            Our issue was that running the command and then putting the device in deep sleep with the A button had a battery of just a few hours.

            Using the power button worked but it is hard to push especially when worn around the neck.

            0_1654267459307_power button sleeve.jpg

            This sleeve has solved the "mechanical" issue with trying to actually use the power button.

            We are getting several days of battery life which is more than perfect.

            • Paul Wheeler
              Local Business Patriots
            1 Reply Last reply Reply Quote 1
            • First post
              Last post