Arduino Project: Simple Blinking LED

Home / Arduino Project: Simple Blinking LED

Arduino Project: Simple Blinking LED

December 11, 2015 | Article | 2 Comments

Blink LED, like what it should be, we make certain LED blinking. We can define “blinking” as continuous condition switching between ON and OFF condition. This is the simplest project we can do for Arduino.



  • Basic understanding of LED


Following is all materials I use for this tutorial.

  • Arduino Uno R3
  • LED

You can change the Arduino board to higher specification if you like. The LED I use will emit red light as it is powered by electricity.

You also need an USB A to B cable for upload our program to our Arduino.


Here is the circuit image, created using Fritzing.

Blinking LED

To build the circuit, attach the LED as shown in the figure. Attach the long leg of an LED (positive leg or anode) to pin 13. Attach the short leg (negative leg or cathode) to the ground (GND). On Arduino Uno, there is also a built in status LED which connected to pin 13. When our Arduino running successfully, both status LED and external LED will start to blink.

We don’t need extra resistor for this project, but make sure you are using pin 13. If you do connect it to other pin, it might be destroyed. The reason is that pin 13 has an internal resistor that other pins don’t have which limit current to our LED.



Let’s see what code we use for this project and discuss it later.

const unsigned int LED_PIN = 13;
const unsigned int PAUSE = 500;

void setup() {
   pinMode(LED_PIN, OUTPUT);

void loop() {
   digitalWrite(LED_PIN, HIGH);
   digitalWrite(LED_PIN, LOW);

Notice that we define two constant here, LED_PIN which is pin we use, and PAUSE for the delay interval which is 500 ms.

The heart of this project is pin 13. We use this pin as output pin. Therefore we initialize pin 13 as an output pin with the statement:


Next in the main loop, we turn the LED on by:

digitalWrite(LED_PIN, HIGH);

and turn it off by:

digitalWrite(LED_PIN, LOW);

And we now know that digitalWrite() function is used to output signal on a pin.

The delay() command is used to tell Arduino to do nothing for given time. In our case, we make Arduino wait for 500 miliseconds.


LED is blinking.

Why it Works

There are two condition of logic in circuit, HIGH and LOW. Some microcontrollers might define HIGH and LOW difference, but in Arduino Uno we have HIGH logic as 5V and LOW logic as 0V. If you know boolean value, yes this is boolean value with HIGH is true and LOW is false.

The LED we use is active-high LED, which means it can turn on when it is given HIGH voltage.


About Author

about author


A man who is obsessed to low level technology.

  1. Arduino Project: Turn On/Off LED using Serial Communication - Xathrya.ID

    […] Blinking LED […]

  2. Arduino Project: Push Button - Xathrya.ID

    […] Blinking LED […]

Leave a Reply

Your email address will not be published. Required fields are marked *

Social Share Buttons and Icons powered by Ultimatelysocial