Skip to content

How to tell if Serial is fully initialized? #1256

Answered by earlephilhower
joba-1 asked this question in Q&A
Discussion options

You must be logged in to vote

while (!Serial); will get you 80% of the way, but the problem is the OS and the Serial Monitor may still take 1-2s before they reconnect and anything send before then will drop. There's nothing on the Pico side that can be done about that.

Something like a delay(5000) or a while (!Serial); delay(2000); might get you 99% of the way there.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@joba-1
Comment options

Answer selected by joba-1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants