With M5Stack CoreInk connected to the IDE 2.2.1 and without any Serial. commands whatsoever in the sketch, after loading a sketch the monitor shows a line of black diamonds with a white "?" in it. On the IDE 1.8.13 they are a line of reversed "?"'s
Setting the Serial.begin command to 115200 (I've tried other speeds too) and the monitor also to 115200 doesn't result in Serial.print commands appearing in the monitor. Just the line of black diamonds with a white "?" in it
What could be the cause of this?
Leftovers from the upload in the PCs buffer?
J-M-L
November 1, 2023, 6:58am
3
What parameters do you have in your M5.begin()
call in the setup?
Does the factory test code print anything?
Some sketches have M5.begin(false, false, false);
and some simply M.begin();
both instances have the same problem.
No. The the Factory test compiles and runs, but nothing in the serial monitor except the back diamonds with a white "?".
J-M-L
November 1, 2023, 10:24am
5
OK - I don't have that device so can't test
which board did you select? '
M5CoreInk, as you've highlighted.
J-M-L
November 1, 2023, 11:42am
7
OK
the begin() function does call Serial.begin(115200);
always.
can you try this code
#include "M5CoreInk.h"
void setup() {
M5.begin();
}
void loop() {
M5.update();
Serial.printf("test\n");
delay(1000);
}
and check with the Serial monitor at 115200 bauds
Ok that works. But I need the monitor to give me info during the setup(), for instance when the BLE is connected, rather than in the loop().
I altered your sketch to the following and it doesn't work (print test in the serial monitor).
#include "M5CoreInk.h"
void setup() {
M5.begin();
delay(1000);
M5.update();
Serial.printf("test\n");
}
void loop() {
// M5.update();
//Serial.printf("test\n");
//delay(1000);
}
Just out of interest I tries adding at the beginning of the setup();
Serial.begin(9600);
while (!Serial);
And setting the serial monitor to 9600 to see if that helped. I also tried this with the while(!Serial); line commented out. No joy either way.
J-M-L
November 1, 2023, 12:25pm
9
As discussed M5.begin() forces serial to be setup at 115200 bauds so don’t call it again
Try
void setup() {
M5.begin();
while (!Serial);
Serial.printf("hello from setup\n");
}
void loop() {
M5.update();
Serial.printf("looping\n");
delay(1000);
}
The serial monitor only shows the "looping" message.
J-M-L
November 1, 2023, 3:12pm
11
Ok
If you use another terminal application, is it the same?
No! Using CuteCom shows both the setup and loop messages.
Thanks for your help, I think you're getting to the problem. Using CuteCom the other sketches that I had problems with also work.
J-M-L
November 1, 2023, 5:25pm
13
Ok seems another bug in the IDE’s serial terminal
The same problem is in the IDEs 2.2.1 and 1.8.13. How does one report a bug?
system
Closed
April 29, 2024, 5:39pm
16
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.