DIY ELECTRONICSTR

← All projects

LED Blink

Beginner10 min

Your first project: it blinks an LED on the Arduino's pin 13 once a second and writes each change to the Serial Monitor. It teaches you to use a breadboard, an LED and a resistor. The board's own L light is also on pin 13, so it blinks along with the LED. No extra library needed.

Build it step by step in the app

What you need

Wiring steps

  1. 1

    Plug the LED into the breadboard

    Plug the LED into the breadboard

    Plug the red LED into the top half of the breadboard, in columns 9 and 10. The LED's long (bent) leg is the plus (+) side and goes in column 9; the short leg is the minus (−) side and goes in column 10. An LED plugged in the wrong way round does not light. On a breadboard, the five holes in a column are connected to each other.

    • LED long leg (+) → column 9
    • LED short leg (−) → column 10
  2. 2

    Add the resistor

    Add the resistor

    Plug one leg of the resistor into column 5 and the other into column 9, the same column as the LED's long leg. The resistor limits the current through the LED; without it, both the LED and the Arduino's pin can be damaged. The resistor in the picture is 220 Ω (red-red-brown); a 470 Ω (yellow-violet-brown) does the same job, with a slightly dimmer LED. Which way round the resistor goes does not matter.

    • One resistor leg → column 5
    • Other resistor leg → column 9
  3. 3

    Connect to the Arduino

    Connect to the Arduino

    Run a red jumper wire from the Arduino's digital pin 13 to the red-striped (+) row at the top of the breadboard, and a black wire from the GND pin next to 13 to the blue-striped (−) row. Then connect the + row to column 5 (the resistor's free end) with a short red wire, and the − row to column 10 (the LED's short leg) with a short black wire. The current flows from pin 13 through the resistor and the LED back to GND.

    • Arduino pin 13 → breadboard + (red) row
    • Arduino GND → breadboard − (blue) row
    • + row → column 5
    • − row → column 10

Arduino sketch

void setup() {
  Serial.begin(9600);      // Seri haberleşmeyi başlat
  pinMode(13, OUTPUT);
}

void loop() {
  digitalWrite(13, HIGH);
  Serial.println("LED Yandi"); // Ekrana durumu yaz
  delay(1000);

  digitalWrite(13, LOW);
  Serial.println("LED Sondu"); // Ekrana durumu yaz
  delay(1000);
}

What the Serial Monitor shows

SERIAL MONITOR · 9600 BAUD
LED Yandi
LED Sondu
LED Yandi
LED Sondu

What you will see

The LED blinks once a second. The board's L light is also on pin 13, so it blinks along with it.

In the app, tick off every wire, match the parts to your inventory and pick up where you left off.

Build it step by step in the app