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 initialisesSerial
as 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