Introduction
The Arduino Uno is one of the most popular microcontroller boards for beginners. In this tutorial, you'll learn how to set up the Arduino IDE, connect your board, and write your very first program.
What You'll Need
- Arduino Uno R3 board
- USB Type-B cable
- Computer (Windows, Mac, or Linux)
- 1× LED (any color)
- 1× 220Ω resistor
- Breadboard and jumper wires
Step 1: Install the Arduino IDE
Download the Arduino IDE from the official Arduino website. Install it on your computer and launch it.
- Go to Tools > Board and select Arduino Uno
- Go to Tools > Port and select the COM port your Arduino is connected to
Step 2: The Blink Sketch
Open File > Examples > 01.Basics > Blink. This is the "Hello World" of Arduino programming.
void setup() {
pinMode(LED_BUILTIN, OUTPUT);
}
void loop() {
digitalWrite(LED_BUILTIN, HIGH);
delay(1000);
digitalWrite(LED_BUILTIN, LOW);
delay(1000);
}How It Works
setup()runs once when the board powers on. Here, we set the built-in LED pin as an output.loop()runs repeatedly. We turn the LED on, wait 1 second, turn it off, wait 1 second, and repeat.
Step 3: Upload & Run
Click the Upload button (→ arrow) in the IDE. After a few seconds, you should see the built-in LED on your Arduino blinking on and off every second.
Step 4: External LED Circuit
Now let's control an external LED:
- Connect the long leg (anode) of the LED to pin 13 through a 220Ω resistor
- Connect the short leg (cathode) to GND
- Upload the same Blink sketch — your external LED will now blink!
What's Next?
Try modifying the delay() values to change the blink speed. In the next tutorial, we'll read input from sensors and display values on the Serial Monitor.