M5.shutdown() not working on M5Paper
-
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);
} -
Hello @schedule-display
Have you tried the RTC example (w/o modifications)?
In your code, why did you add the two
gpio_xxxlines? I think they are the reason M5Paper cannot shutdown.Also this thread might be helpful.
Thanks
Felix
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