Your very first Arduino project - learn how to wire and program an LED to blink step by step.

~20 mins Beginner Arduino UNO
Components Needed
  • Arduino UNO
  • 1x LED (any color)
  • 1x 220Ω Resistor
  • Breadboard
  • Jumper Wires
  • USB Cable
Software Required
  • Arduino IDE (free download)
  • USB Driver for Arduino
Step 1

Install Arduino IDE

Download and install the Arduino IDE from the official website.

  1. Go to arduino.cc/en/software
  2. Download the version for your OS (Windows / Mac / Linux)
  3. Install it and open the IDE
  4. Connect your Arduino UNO via USB - the IDE should detect it automatically
Go to Tools → Board and select Arduino UNO. Then go to Tools → Port and select the COM port your Arduino is connected to.
Step 2

Wire the Circuit

Connect the LED and resistor to the Arduino on a breadboard.

  1. Place the LED on the breadboard - note the longer leg is positive (+)
  2. Connect the positive leg of the LED to Pin 13 on Arduino via a jumper wire
  3. Connect a 220Ω resistor between the negative leg of the LED and the GND pin on Arduino
Wiring Diagram
LED Blink Wiring Diagram - Arduino UNO with LED and resistor
Always use a resistor with an LED - without it, too much current flows and the LED will burn out instantly.
Step 3

Write the Code by opening Arduino UNO

Open Arduino IDE, create a new sketch, and type the following code:

sketch.ino
// Blink LED - NKDevSpace Tutorial

void setup() {
  pinMode(13, OUTPUT);  // Set pin 13 as output
}

void loop() {
  digitalWrite(13, HIGH);  // Turn LED ON
  delay(1000);              // Wait 1 second
  digitalWrite(13, LOW);   // Turn LED OFF
  delay(1000);              // Wait 1 second
}
Step 4

Upload & Run

  1. Click the Upload button (right arrow icon) in Arduino IDE
  2. Wait for "Done uploading" message at the bottom
  3. Your LED should now blink ON and OFF every 1 second!
Try changing the delay(1000) value - smaller number = faster blink, larger = slower. Try delay(200) for a fast blink!
Step 5

Try It Yourself - Challenges

Now that it works, try these to level up:

All Tutorials Next Tutorial