Skip to content

If sketch is not connected to serial - dump serial output #123

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: arduino
Choose a base branch
from

Conversation

KurtE
Copy link

@KurtE KurtE commented May 17, 2025

Should resolve #35

Tested with Portenta, but should work on all of the others as well.

Current code would hang after a few Serial.print like statements happened when we are not connected to the Serial monitor.

So I put overrides in for the Serial.write(buf, cnt) and Serial.flush() That would first check to see if Serial returns true (DTR)...

This appears to match the behavior of the MBED Portenta H8 code.

Current code would hang after a few Serial.print like statements happened when we are not connected to
the Serial monitor.

So I put overrides in for the Serial.write(buf, cnt) and Serial.flush()
That would first check to see if Serial returns true (DTR)...

This appears to match the behavior of the MBED Portenta H8 code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GIGA: Serial.flush() will hang if the Serial monitor is not connected.
1 participant