Failed uploading, can't select a port

We're working on a project for a STEM Fair and now I'm getting the dreaded "Failed uploading: uploading error: exit status 1". What's odd is that things were working fine up to a point then the serial monitor wasn't updating and I was unable to upload a new sketch. I know it is not a USB cable problem as I have been using a micro-USB cable successfully to upload test code for several days now. The "Select Other Boards and Port" tool just says "NO PORTS DISCOVERED". The Tools>Ports menu item is greyed out. I do not see the COM port anymore on the Windows Device manager. Rebooting doesn't help. I've tried two different laptops and same problem and indications. This leads me to think it might be something in the board. Any suggestions? I saw something about clicking the reset button on the board twice to put it in a bootloading mode, something like that? Might that help?
Details: I'm using Arduino Nano Connect RP2040 and IDE 2.3.6 on Windows 11 Home 24H2.

Have you tried double tapping the reset button to get the board to stay in bootloader mode?

Thanks for replying. I have double-tapped it but what indications should I be looking for that something has happened?

I've continued to experiment and this is where I am now. I have a spare Nano Connect (with problems reading and writing to pins) that I'm experimenting with. When I connect it to the USB, I am able to see it on the device manager and via the "Select Other Boards and Port" tool, and I can upload and run a simple sketch (output to the serial monitor). When I detach the new Nano Connect from its Screw terminal adaptor and connect it to the USB, it now shows on the device manager and via the "Select Other Boards and Port" tool, and I can upload and run the same sketch and watch it run on the serial monitor. When I plug the new Nano Connect back into the Screw terminal adaptor, I no longer see it on the device manager nor via the "Select Other Boards and Port" tool, nor can I upload a sketch. I'm going to disconnect all wires from the screw terminal adapter and see if that solves the problem, then slowly add everything back one at a time to see if that identifies the issue. Wish me luck.

If you have been changing the wiring when the system (nano) is powered up you will need a lot of luck. That is a sure fire way of damaging things.

2 Likes

And it's also a good way to wipe out a USB port at the same time.

Agreed. We are trying to be careful to disconnect the USB power and the USB connection from the Nano Connect to the laptop before connecting/disconnecting anything.

1 Like

OBTW this is following the wiring for the "IoT Smart Garden Setup with Nano RP2040 Connect" project. Note - power is disconnected before making any changes.

Results:

  1. Remove the Nano Connect from the Screw adapter, connect it via its USB connection to the laptop using a data synching USB cable and it operates as expected (i.e. able to see it on the Windows Device Manager, and via the "Select Other Boards and Port" in the IDE, and able to upload sketches).
  2. Remove all connections to the Screw adapter, insert the Nano and it operates as expected.
  3. Connect a USB 5V power supply to the Screw adapter (Vin and GND), then plug it into a brick. The Nano operates as expected and voltages are good.
  4. Connect a soil moisture sensor to an analog pin set for pinmode INPUT, Vin and GND. Upload and run a sketch that successfully reads the analog pin.
  5. Connect a relay to the V3.3 pin, GND and a digital pin set for pinmode OUTPUT, upload a simple sketch to toggle the relay, and the Nano and relay operate as expected.
  6. Connect power lead to a small 5V pump to one terminal on the relay and Vin to the other terminal and problem reappears (i.e. serial connection is lost and relay cycles rapidly).

Tracking down a schematic for the relay now. Maybe it matters which terminal is used, or 3.3V is insufficient to drive the relay. We'll see.

No any single pin has the same drive capacity.

This is most probably the case. Most relay boards however have built in drivers so that might not be a problem. However, if the relay is just a raw relay then you will not be able to turn it on with 3V3 (or even a 5V Arduino pin) unless you add your own relay driver, consisting of a npn transistor and a couple of resistors.