Sub topic 6
Selecting Your Board
Prerequisites and the role of board selection
This chapter assumes that you have installed Arduino IDE 2, connected a supported Arduino board with a USB data cable, and understand that a sketch is a program that runs on the board. You should also know how to open the IDE and create or open a sketch.
Before uploading a sketch, the IDE needs to know which board you are using. Board selection tells the IDE how to compile the sketch and which upload method to use. It affects details such as:
- The microcontroller architecture and available memory.
- The names and behavior of board pins.
- The compiler settings used to build the sketch.
- The bootloader protocol used during upload.
- The memory limits reported by the compiler.
Board selection is separate from port selection. The board identifies the hardware type. The port identifies the USB connection currently used by that board.
Select a board in Arduino IDE 2
Arduino IDE 2 provides a board selector near the top of the window. It may display a board name, such as Arduino Uno, or a prompt to select a board.
You can also use the menu:
- Open the Tools menu.
- Choose Board.
- Choose the board package category.
- Choose the exact board model.
For a standard Uno, the path is usually Tools > Board > Arduino AVR Boards > Arduino Uno. The words may differ if you use another board family.
The board package is a collection of compiler definitions, upload tools, and board descriptions. Arduino IDE includes the package for many official Arduino boards. Third-party boards may require a separate package installed through Boards Manager.
Use the exact model printed on the board. For example, select Arduino Nano rather than Arduino Uno if the board is a Nano. The boards may look similar, but they can use different pin mappings and upload settings.
Board options that need extra care
Some models have a second setting after you choose the board. The classic Arduino Nano is a common example. Its Processor menu may include:
- ATmega328P
- ATmega328P (Old Bootloader)
- ATmega168
Start with the normal processor option. If compilation succeeds but uploading fails with a programmer or synchronization error, try the processor option that matches the board's bootloader. Older Nano boards often need ATmega328P (Old Bootloader).
The board selector may also show a board as Unknown when the IDE detects a connected port but cannot identify the board automatically. Automatic detection is helpful, but do not treat it as proof that the correct board was selected. Confirm the model printed on the hardware.
How the selection affects an upload
The IDE uses the selected board definition during several stages:
If you select an Uno while using a Nano, the IDE may compile successfully because both boards can use similar chips. The upload can still fail, or the sketch can behave unexpectedly because the board definition is wrong.
Confirm the selection
Before compiling, check the board name shown in the board selector or under the Tools menu. If the IDE shows both a board and a port, verify the board first and the port separately.
A reliable sequence is:
- Read the model printed on the board.
- Select that exact model in the IDE.
- Choose a processor option only when that model provides one.
- Confirm that the board package is installed.
- Continue to port selection and upload.
Exercise
You have an Arduino Nano. The sketch compiles, but uploading fails. Which board setting should you check first if the Nano is an older model?
Show answer
Check the Processor setting and try ATmega328P (Old Bootloader), while keeping Arduino Nano selected as the board.