Buy Aruino   Buy Arduino Uno on AliExpress

How to Blink LED with Arduino

You might have seen blinking Led on decorative lightning, one you might use on Christmas. Well, question is that how do they work?

There are several methods to Blink LED. But we will be limited to blink it with Arduino which is very easy.


  • Arduino Board
  • LED
  • Hook up wire (to connect LED to Arduino)

Circuit Diagram

Anode (bigger leg of LED) is connected to the resistor then to the digital pin 13 and cathode is connected to the ground, this completes the circuit. Now the current will flow through the LED hence it will glow.


Sample program to blink the LED.

/* Sample program to blink the LED */
const pin =9 // pin to which LED is connected
Void setup()
{ pinMode(9,OUTPUT);
void loop()
delay(2000);// Waits for 2 seconds

Functions Used

delay(): It waits for the time (in millisecond) you pass in it.

The program will stop executing for that period of time means it will not execute lines below it.