0
0
AutocadHow-ToBeginner · 3 min read

How to Select Board and Port in Arduino IDE Easily

In the Arduino IDE, select your board by clicking Tools > Board and choosing the correct Arduino model you are using. Then select the port by clicking Tools > Port and picking the COM port connected to your Arduino device.
📐

Syntax

To select the board and port in Arduino IDE, use the menu options:

  • Board: Tools > Board > [Your Arduino Model]
  • Port: Tools > Port > [COM Port]

This tells the IDE which Arduino hardware you are programming and which connection to use.

💻

Example

This example shows how to select the board and port before uploading a simple blink sketch.

arduino
// Blink example
void setup() {
  pinMode(LED_BUILTIN, OUTPUT);
}

void loop() {
  digitalWrite(LED_BUILTIN, HIGH); // turn LED on
  delay(1000);                      // wait 1 second
  digitalWrite(LED_BUILTIN, LOW);  // turn LED off
  delay(1000);                      // wait 1 second
}
Output
The built-in LED on the Arduino board blinks on and off every second.
⚠️

Common Pitfalls

Common mistakes when selecting board and port include:

  • Choosing the wrong board model, causing upload errors.
  • Not selecting the correct COM port, so the IDE cannot communicate with the Arduino.
  • Port option missing because the Arduino is not connected or drivers are not installed.

Always connect your Arduino before opening the IDE and install necessary drivers.

arduino
/* Wrong way: No board or wrong board selected
 * This causes errors like "avrdude: stk500_recv(): programmer is not responding"
 */

/* Right way: Select correct board and port from Tools menu before uploading */
📊

Quick Reference

StepAction
1Connect your Arduino to the computer via USB.
2Open Arduino IDE.
3Go to Tools > Board and select your Arduino model.
4Go to Tools > Port and select the COM port for your Arduino.
5Upload your sketch.

Key Takeaways

Always select the correct board model under Tools > Board before uploading.
Choose the right COM port under Tools > Port to connect to your Arduino.
If the port is missing, check your USB connection and install drivers.
Connect your Arduino before opening the IDE to ensure ports appear.
Selecting wrong board or port causes upload failures and errors.