Nano V3.0/The first hour/07. Set up the Arduino IDE
The first hour · 07 of 9

Set up the Arduino IDE

Three rows in the Tools menu decide whether an upload works: Board, Processor and Port. The Port row is the one that goes wrong, and it goes wrong in the cable or the driver, not in the IDE.

The board goes in first

Seat the Nano in the shield before you plug in the cable, with the power off and the USB-C connector at the boxed USB mark. The first page of the book has the rule. The cable goes in last, and comes out first.

Three rows

The three rows, and what a wrong one looks like
First try
What you have chosen
Board
Arduino Nano
Processor
ATmega328P
Port
listed
Board Arduino Nano, Processor ATmega328P, Port the CH340. Start here. The Nano’s TX and RX lamps blink while the upload runs, and the IDE ends with “Done uploading”.

In the Arduino IDE, open Tools and set:

  • Board: Arduino Nano, under Arduino AVR Boards. That package comes with the IDE.
  • Processor: ATmega328P. If the upload fails with not in sync, choose ATmega328P (Old Bootloader) and upload again. There are two bootloaders in the field and they talk at different speeds. We have not checked which one this board ships with, so the error is the test.
  • Port: the one that appears when the Nano is plugged in.

Every sketch in this book prints these rows in a comment at the top, so they travel with the file.

The port is the CH340C

The Nano has no USB in its chip. A CH340C next to the USB-C socket turns USB into the serial line the ATmega328P's bootloader listens to, and the port in the menu is that chip.

Recent Windows and macOS releases usually already carry a driver for it, and Linux usually does too. If the Port menu stays empty with a cable you trust, look for the CH340 driver from its maker, WCH, and install that. The port looks like COM and a number on Windows, and a name with usbserial or wchusbserial in it on a Mac. The number is your operating system's choice, not a property of the board.

The cable has to carry data

A charge-only USB-C lead supplies power and nothing more: the ON lamp lights, a sketch already on the board runs, and the Port menu is empty. Use a lead you have moved a file with.

What a good upload looks like

Press Upload. The Nano's TX and RX lamps blink while it runs, and so do the shield's TXD and RXD lamps, because they are on the same line. The IDE ends with Done uploading. If those lamps never blink, nothing reached the board.

When it does not work

The upload ends with not in sync

The uploader and the bootloader are not talking at the same speed. Change Tools, Processor to ATmega328P (Old Bootloader) and upload again. We have not checked which bootloader this board ships with, so this is the thing to try, not a rule.

The Port menu is empty or greyed out

The computer has not seen the Nano. Try a different cable first: a charge-only USB-C lead powers the board and carries no data. Then check the port with the shield removed, and read the next entry if it is still empty.

A port appears, but only with the Nano out of the shield

Check that the Nano is fully home and the right way round with the power off, using the seating page. A Nano that is half seated or turned round can be fed, and loaded, by pins it should not be. Take it out with the cable unplugged, seat it again, and then plug in.

The port appears, and the upload still fails

Close the Serial Monitor, and anything else that has the port open, and try again. Then check that Board and Processor are the two rows on this page, and that the port is the one that appears and disappears when you plug and unplug the Nano.

Where this goes next

One sketch that lights every pin it is safe to drive, one at a time.

Chase the LEDs →

Edit this page — content/books/nano/set-up-the-ide.mdx

Community

Questions about this product

See what other owners have asked, and read their solutions.

This page covers several products. Choose yours to see the right discussions.

Discuss this article

Ask about this page. The answer stays here, on the page it belongs to, for whoever hits the same wall next.

Browse Modules and blocks on the forum →