I am running Linux and the Arduino IDE, but I cannot connect to the Pico device.
It is recognised on my PC as a memory stick, but the IDE recognises the board, but won't provide a Host #.
I saw a previous topic on the same subject, and I tried uploading without success and I tried pressing the BOOTSEL button on the Pico whilst attaching the device to computer, but that made no difference.
Many thanks - I hadn't seen it, but I followed the instructions, but it made no difference - after running the shell script, I reloaded the Arduino IDE, and it still failed to detect any ports.
As I am new to this, maybe I misunderstood something,
Hi @thetrev. On the Pico, the USB CDC serial port is generated by code that runs in the background of the Arduino sketch program.
When you first get a Pico, it doesn't have an Arduino sketch running on it, so it is expected that it won't produce a port. Fortunately the upload tool can upload to the board even when there is no serial port. You just need to put the board into "USB Mass Storage Mode" by holding the "BOOTSEL" button while connecting the USB cable to your computer. After you upload the first Arduino sketch to the board, it will start to produce a serial port and from then on you can upload to the board without having to put the board into "USB Mass Storage Mode".
Please try this:
Unplug the USB cable of the Pico from your computer.
Press and hold the button marked "BOOTSEL" on the board.
While still holding the button down, connect the USB cable of the Pico to your computer.
Open any sketch in Arduino IDE.
Select Sketch > Upload from the Arduino IDE menus.
The upload should complete successfully. After that, you should see a serial port for the Pico in the Tools > Port menu of Arduino IDE.
Many thanks for your help - I had tried exactly as you mentioned before without success, but this morning, the only difference was that I compiled the default - blank code, uploaded, and it seems to work now.
Kind Regards,
This could indeed be significant. As I mentioned, the serial port is produced by code that runs in the background of your sketch code. This means your sketch code can break the USB code, or stop it from running. When that happens, the board no longer produces a serial port.
This interference from the sketch code might be expected (e.g., putting the microcontroller to sleep), or caused by a bug (e.g., a divide by zero).
This potential for sketch code to impact the port can be unexpected to those who previously mainly worked with the boards like Uno and Mega with a dedicated USB chip that can never be affected by the sketch code.
Fortunately it is easy enough to recover the board from this state once you know the right procedure (in this case, putting the board into the "USB Mass Storage Mode" and then doing an upload). But if you upload the same problematic sketch then you will likely get the same "no port" result. In this case, uploading some "known good" sketch like the one you get from selecting File > New Sketch from the Arduino IDE menus will cause the board to once more produce a port. If you encounter that situation, then you will need to carefully analyze the code of the problematic problematic sketch to find exactly which part is interfering with the USB CDC serial code.