Menu Close

How to Interfacing LED with Arduino

0 0
Read Time:58 Second

Interfacing LED with Arduino & LED Blinking Circuit

(Nano , Uno , Mega)

Led blinking is the beginner and very easy step to start your projects with arduino. 

Lets get started

COMPONENT REQUIRED:

  1. Arduino (Nano or UNO or Mega)
  2. Resistor (220 or 1K Ohm)
  3. LED
  4. Jumper Wires
  5. Breadboard

LED:

First identify the anode (+ ve) leg and the LED cathode (-ve).

Following the diagram gives a clear LED view

CIRCUIT CONNECTIONS:

Now connect one end of resister to the 5v and other end to the positive leg of LED .Connect Negative leg of LED connect to the pin 13. 

Arduino Code for LED Blinking:

int ledpin = 13;  //pin where led LED Ground connect

void setup()

{

  pinMode(ledpin, OUTPUT); //Select pin 13 as a output

}         

void loop()

  digitalWrite(ledpin, LOW );  //at start LED low 

  delay(1000); //1 second delay

  digitalWrite(ledpin, HIGH);   //LED pin high and LED turns On

  delay(1000);  //1 second Delay            

}

Happy
Happy
0 %
Sad
Sad
0 %
Excited
Excited
0 %
Sleepy
Sleepy
0 %
Angry
Angry
0 %
Surprise
Surprise
0 %

Average Rating

5 Star
0%
4 Star
0%
3 Star
0%
2 Star
0%
1 Star
0%

Leave a Reply

Your email address will not be published.

%d bloggers like this: