Closed sylque closed 2 months ago
Perhaps you just missed that message, establishing a serial connection takes time, and the content in setup will only execute once.
@Tinyu-Zhao, I'm not sure I get your point. Sure, you can wait 2 seconds at startup or, even better, use ESP32 log primitives (log_printf
, etc.). But those workarounds are no fix for people who expect Arduino code to work among platforms.
@Tinyu-Zhao, I'm not sure I get your point. Sure, you can wait 2 seconds at startup or, even better, use ESP32 log primitives (
log_printf
, etc.). But those workarounds are no fix for people who expect Arduino code to work among platforms.
Your device in the establishment of a serial port connection with esp32 takes time, and the serial port initialisation is very fast, successful initialisation that is the implementation of the output, the output information is likely to be in the serial port connection is established before you naturally will not see any output.
Describe the bug
According to Arduino's documentation:
The M5StickC-Plus has native USB, so I think
if (Serial)
should return true only when a USB connection is established. This doesn't seem to be the case.To reproduce
Use this code from Arduino's documentation:
This code doesn't display "Hello World" in the terminal, because the line
Serial.println("Hello World");
is called before the USB connection is established.Expected behavior
You should see "Hello World" in the terminal.
Screenshots
No response
Environment
Additional context
No response
Issue checklist