Skip to content

Raspberry pi pico while(!Serial) bug #406

@qwec01

Description

@qwec01

Hi,
I'm using Rpi PICO with arduino IDE 1.8.19, when using Serial (USB port), my code stuck in while(!Serial) at first power on, but when I open Serial Monitor (maybe resets the pico), my code can run with no problem. If I change Serial to Serial1 (UART at pin0 and1), or comment out "while(!Serial)" line, my code can run with no problem, Serial and Serial1 are working with no problem. I think this maybe a bug. Here's my code.
void setup() {
pinMode(LED_BUILTIN, OUTPUT);
digitalWrite(LED_BUILTIN, HIGH);
Serial.begin(9600);
while(!Serial);
digitalWrite(LED_BUILTIN, LOW);
}
Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions