How to tell if Serial is fully initialized? #1256
-
Hi, I noticed that my early boot messages are never displayed on Serial/USB of my Pico-W. Is there a way to find out if a message made it to the wire or do I need to delay important messages for 1s and hope for the best? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Something like a |
Beta Was this translation helpful? Give feedback.
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 awhile (!Serial); delay(2000);
might get you 99% of the way there.