Arduino NANO not compiling code

I have an Arduino NANO however when I try to upload code I says "uploading..." then it gives me this error:

Sketch uses 444 bytes (1%) of program storage space. Maximum is 30720 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes.
avrdude: ser_open(): can't open device "\.\COM4": The semaphore timeout period has expired.

Failed uploading: uploading error: exit status 1

Are you sure your Arduino Nano (classic) is on COM4? It appears that something prevents the IDE from opening COM4. Try re-starting your PC before trying again.

I have tried restarting my computer multiple times, could it be an issue with the cable or drivers of some sort?

How do you know it's COM4 you're connecting to?

Do you have anything else (like another app) using COM4?

Try using IDE 2.0 which will auto-detect your board and use a good quality USB cable to connect your board to the PC.

There are versions of the Nano around that use a different USB chip and the "old bootloader". Under tools\processor try selecting the old bootloader option and see if that works. The first 3 Nanos I bought were from Elegoo and they needed this, the second lot was also from Elegoo but they needed the standard bootloader.

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.