Hello, hope this is the right forum.
I am having a very difficult time getting my Pi Pico to connect as a USB serial device on my Windows PC Ver. 8.1.
I am using Arduino IDE 1.8+...as I did not get the Visual Code properly programmed to use the Pico SDK.
I've found on the net a method to use in SDK using "Cmake (pico_enable_stdio_usb(main 1))" but again, I am using the Arduino IDE...not the SDK.
Any suggestions on how to force the Arduino IDE to load the right files for my Pico to connect as a USB serial device on my Windows PC?
Thank you Mike...I appreciate the reply.
However, what I need is for the Pico to connect (enumerate in Windows) as a USB virtual serial port when plugged into the PC...so it will use the USB for it's serial physical level transport.
There seems to be a bug in the software stack that requires you to set ignoreFlowControl to true that has been mentioned elsewhere. Without it, the pico will receive data fine, but transmit data may be missed by the host.
Thanks, that does help.
What I am expecting is for the Pico to enumerate as a virtual Windows serial port when plugged into the USB.
It does show as a folder on the PC as a Windows folder if I hold down the button and plug into the USB...but not what I need.
My end goal is to have a sketch loaded into the Pico, plug it into the USB, enumerate as a virtual serial port, and use a terminal reader to view data sent from the Pico.
Yes, this is what I was thinking you wanted. You want to wire a button to the RUN pin on the Pico that connects to pico GND when pressed. This will reset the Pico. Then, you keep the USB plugged into the host. If you want to submit a new sketch, hold BOOTSEL button, then press your reset button, release the reset button, then release your BOOTSEL. It will mount as folder like you mentioned so you can reprogram the pico.
If you don't hold BOOTSEL, then the pico will always just boot into the sketch. So, if the sketch has the code I gave above in setup(). BTW, you might want to put while(!Serial) {}; in the setup because the USB UART takes around 800ms (an eternity in computing) to initialize. So, if you don't while your sketch is working and outputting information, the UART may still be initializing.
You can then use the Serial.print and Serial.println commands to output to your host computer over the USB serial. You will need a serial program (or use the Arduino IDE Serial Monitor) to display the serial bytes coming across USB.