I am testing a project on Arduino Nano. I copy-paste the code on the Arduino IDE and click "Upload". I see:
No device found on cu.usbserial-<unique id>
An error occurred while uploading the sketch
The computer sees the board: when I disconnect the board from the USB socket, the list of ports in Tools > Port
no longer shows this port.
The error thing happens:
- if I press the reset button first, then click "Upload"
- if I change the USB cable (I tried 5 different ones, one of which worked a few years ago, the last time I used this same board)
- if I use a simple blink code
- if I connect to a different USB port
- if I upgrade the Arduino IDE to the latest software from arduino.cc .
The Get board info
command shows that the computer can read the VID and the PID, but not the serial number or the board type. If I connect an Arduino Uno to the same socket, I can see the serial number and the board type, but I get the same error message (just with a different port ID). Neither boards show signs of degradation.
The Boards Manager shows that the Arduino AVR Boards, which include Arduino Uno and Arduino Nano, are installed.
When I click "Upload", the IDE compiles the program, then the Nano's L LED blinks, then the TX blinks, then a pause, then the L, then the RX, then the L, then the RX, and then the IDE shows the error. So I suspect that the error is not what the IDE says.
Furthermore, the connection between the Arduino and the IDE is working because the Serial Monitor shows the output of the previous program (at 9600 baud).
Some Arduinos can reset by connecting RX to GROUND and uploading code, but this one does not have an RX pin.
How can I debug this error?
Tools > Board
, just aboveProcessor
, as I wrote in the answer (which I wrote at the same time as you wrote your first comment).Board: "Arduino Nano"
, left over from the last time I used it a few years ago. But when I dove into the sub-menus,Arduino Nano
did not have a tick on it. Clicking it solved the issue. It may be a bug in the IDE...