LED Blinking program using Arduino

All Arduino board has built in Led installed. They are generally interfaced on the 13th pin of the board. We will implement led blinking using Arduino. LED’s are a low power light generating device which emits light when acted upon some potential energy. I have an Arduino UNO Board which has a general purpose LED connected at Port number 13. The LED highlighted in the below image is the one which we are going to make it blink.

Requirements:

  • Arduino Board
  • PC well configured with Arduino UNO software
  • Brain 🙂

Procedure:

1) Open Arduino software on your PC and write the following code:


void setup()
{
pinMode(13,OUTPUT);// setting pin 13 as a output port
}

void loop()//infinite loop
{
digitalWrite(13,HIGH);//making LED on
delay(500);//giving 500 milisecond delay
digitalWrite(13,LOW);//making LED OFF
delay(500);//giving 500 milisecond delay
}

It will look like below image.

2).Now Click on Verify to compile the above program. It will show done compiling below if everything goes just fine.

3). Now connect your arduino board. Be sure to select proper board and Port from tools menu.

4) Click on Upload icon to feed the code to the Board. The status will show as Done Uploading.

5)You can see LED on port 13 blinking at 500ms rate.

This is the best way one can check an Arduino board whether it is working or not. A blinking LED can be used as a heart beat of any microcontroller circuit.

 

1 COMMENT

LEAVE A REPLY

Please enter your comment!
Please enter your name here