How to Blink LED Using Arduino

13,709

10

3

Introduction: How to Blink LED Using Arduino

Blink LED using arduino UNO microcontroller or make LED turn off and on continuously.

Use-

Basic knowledge of microcontroller(I/O)

Step 1: Requirement

Requirement(Hardware)-

x1 -LED

x1 –Breadboard

x1 –Arduino UNO

x1 –Resistor (220ohm)

x4 –Jumper cables(M-M)

x1 –Computer or laptop

Requirement(Software)-

Arduino IDE software

https://www.arduino.cc/en/Main/Software

Step 2:

Take a Led and determine positive and negative leg.

Long leg = Positive

Short leg= Negative

Step 3:

Take a breadboard and determine flow of current in breadboard

First and last two lines = current flow row wise

Middle lines = current flow in column wise

Step 4:

Make a circuit like shown in schematic or you can directly mount on arduino.

Arduino’s pin 13 connected to positive leg of LED through resister

Arduino’s GND connected to negative leg of LED.

Step 5:

Write code and upload it on arduino.

To upload code into arduino, need to attach arduino with pc using USB cable which is come with arduino board.

Now, In arduino IDE goto FILE>Examples>Basic>Blink or copy this code and press upload in toolbar.

Code-

// the setup function runs once when you press reset or power the board

void setup()
{
// initialize digital pin 13 as an output.

pinMode(13, OUTPUT);
}

// the loop function runs over and over again forever
void loop()
{

digitalWrite(13, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(13, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}

Step 6: It’s Done Congrats.

1 Person Made This Project!

Recommendations

  • Anything Goes Contest 2021

    Anything Goes Contest 2021
  • Fix It Speed Challenge

    Fix It Speed Challenge
  • One Board Contest

    One Board Contest

3 Comments

0
xenetuff8
xenetuff8

10 months ago

Write a program to blink default LED on the Arduino board with a delay of 2sec,

0
DIY Hacks and How Tos

Great intro to Arduino tutorial. It is very well written and easy to follow.

0
shanmadi
shanmadi

Reply 4 years ago

This was my first tutorial and Thanks for your feedback :)