03. Arduino IDE 2 & First Upload
Install, verify, upload and diagnose the Blink sketch.
Learning outcomes
- Install and navigate Arduino IDE 2
- Select the Uno board and correct port
- Explain verify, compile and upload
- Use compiler and upload messages to diagnose faults
Parts and preparation
Arduino Uno, USB data cable and Arduino IDE 2.
Before power: inspect wiring, confirm supply voltage and ensure all connected circuits share GND.
From sketch to machine code
Verify compiles C++ source and reports syntax/type errors. Upload compiles and transfers the binary program through the selected port. Reset starts the program from the beginning.
Board and port
The board choice selects the correct core and upload method. The port identifies the connected board. A missing port often means a cable, driver or permission problem.
Library Manager
Use Tools -> Manage Libraries to install third-party libraries. Each lesson that needs a library has a Libraries box with the exact Library Manager name and author. Install only that package, because similarly named libraries often use different APIs.
Wiring and safe build sequence
- Connect Uno by USB
- Tools -> Board -> Arduino Uno
- Tools -> Port -> choose the port that appears when the Uno is connected
- File -> Examples -> 01.Basics -> Blink
Worked sketch
Download .ino sketchvoid setup() {
pinMode(LED_BUILTIN, OUTPUT);
}
void loop() {
digitalWrite(LED_BUILTIN, HIGH);
delay(1000);
digitalWrite(LED_BUILTIN, LOW);
delay(1000);
}How the code works
- LED_BUILTIN maps to the boards onboard LED pin.
- setup runs once after reset; loop repeats indefinitely.
Test and record evidence
Practical evidence checklist
Common faults and checks
- Port not found: reconnect with a known data cable.
- Not in sync: verify Uno and port selections, close other serial programs and retry.
- Compilation error: read the first error, not only the final summary.
Check your understanding
Q1. What does Verify do?
Show answer
Compiles the sketch and reports errors without uploading.
Q2. What is the difference between board and port selection?
Show answer
Board selects the target hardware definition; port selects the connected device.