Introduction

The blinking LED project is usually the first program beginners build when learning Arduino.

In this project you will learn how to control an LED using simple Arduino code.

This is one of the best beginner electronics projects for students learning programming and microcontrollers.


Materials

  • Arduino Uno
  • LED
  • 220Ω resistor
  • Breadboard
  • Jumper wires
  • USB cable

Circuit connection

ComponentArduino Pin
LED13
Resistor220Ω
GNDGround

Arduino Code

int led = 13;

void setup() {
pinMode(led, OUTPUT);
}

void loop() {
digitalWrite(led, HIGH);
delay(1000);
digitalWrite(led, LOW);
delay(1000);
}

Code explanation

pinMode()
Sets the LED pin as an output.

digitalWrite()
Turns the LED on or off.

delay()
Pauses the program for a specific time.


Result

The LED will turn on for one second and then turn off for one second repeatedly.


Ideas to improve the project

  • Change the blinking speed
  • Add more LEDs
  • Control the LED with a push button
  • Create light patterns

SEO keywords

arduino blinking led tutorial
arduino beginner projects
arduino projects for students
basic arduino electronics project