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

    M5.shutdown() not working on M5Paper

    Scheduled Pinned Locked Moved Cores
    2 Posts 2 Posters 3.6k 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.
    • S Offline
      schedule display
      last edited by

      Re: M5Paper Shutdown() / Deep Sleep / Wakeup

      I am using M5Paper but M5.shutdown() is not working even the device is disconnected from the USB. The Loop still running and M5Paper still remains On.
      How to shutdown M5Paper and wake up again after specific time intervals?

      I am using the sample code from M5 Stack [https://docs.m5stack.com/en/api/m5paper/system_api](link url)

      #include <M5EPD.h>

      M5EPD_Canvas canvas(&M5.EPD);

      void setup()
      {
      M5.begin();
      M5.EPD.SetRotation(90);
      M5.TP.SetRotation(90);
      M5.EPD.Clear(true);
      M5.RTC.begin();
      canvas.createCanvas(540, 960);
      canvas.setTextSize(3);
      canvas.drawString("Press PWR Btn for sleep!", 45, 350);
      canvas.drawString("after 5 sec wakeup!", 70, 450);
      canvas.pushCanvas(0,0,UPDATE_MODE_DU4);
      }

      void loop()
      {
      if(M5.BtnP.wasPressed()){
      canvas.drawString("I'm going to sleep.zzzZZZ~", 45, 550);
      canvas.pushCanvas(0,0,UPDATE_MODE_DU4);
      delay(1000);
      gpio_hold_en((gpio_num_t) M5EPD_MAIN_PWR_PIN);
      gpio_deep_sleep_hold_en();
      M5.shutdown(5);
      }
      M5.update();
      delay(100);
      }

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

        Hello @schedule-display

        Have you tried the RTC example (w/o modifications)?

        In your code, why did you add the two gpio_xxx lines? I think they are the reason M5Paper cannot shutdown.

        Also this thread might be helpful.

        Thanks
        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