M5Paper stuck in M5.begin();
-
Hi,
I'm doing my first steps with the M5Paper and even the slightest examples often fail, because the device is stuck in the M5.begin() function - it never returns from it.
With the next upload, it works again, slightest change - stuck again.
I'm using Arduino IDE. Am I doing something wrong or is my device faulty?
Best regards,
Michael
-
Are you resetiing the M5Paper between each programming attempt?
-
I'm not manually resetting it, no. But even if I reset it, it doesn't work.
-
Hello @michael_o
would you mind sharing one of the examples which fails on your M5Paper?
Thanks
Felix -
Sure. Even this tiny example fails. It prints "Begin", but not the "initializing ... OK" which M5.begin() usually prints.
#include <M5EPD.h>
M5EPD_Canvas canvas(&M5.EPD);
void setup() {
Serial.begin(115200);Serial.printf("Begin\n");
delay(1000);M5.begin();
M5.EPD.Clear(true);
}void loop() {
yield();
} -
Hello @michael_o
thanks. Most likely the issue is the double initialisation of
Serial. If you have a look intoM5.begin()you'll see that by default it initialisesSerialas well.if (SerialEnable == true) { Serial.begin(115200); Serial.flush(); delay(50); Serial.print("M5EPD initializing..."); }So I suggest you change your code to:
#include <M5EPD.h> M5EPD_Canvas canvas(&M5.EPD); void setup() { M5.begin(); M5.EPD.Clear(true); } void loop() { }Note: untested as my M5Paper currently is in a long term battery test.
Hope this helps.
Thanks
Felix -
That's right, it looks like that was the problem. Thank you very much. What a peculiar behaviour if you init Serial twice.
Michael
-
Hello @michael_o
you are welcome. I am glad to hear you got it working and thank you for reporting back here.
Cheers
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