Arduino Tutorial 2 : Interfacing LED with Arduino Leave a comment

Hello Friends !

We are bringing to you the Tutorial: 2 for How to Interface LED with Arduino.

LED Interfacing is a good start for Arduino beginners. Here, lets learn a simple LED blinking circuit / code with Arduino.

A LED is a two-terminal semiconductor light source. This simple P-N junction diode emits light when it gets activated and usually requires a small voltage for its operation. When voltage is applied, the electrons will recombine with the holes and will release energy in the form of light.

Step1:
Open Arduino IDE. Then open, File –> Examples –> Basics –> Blink

Step2:
Code:
int led = 13; // the pin the LED is connected to
void setup()
{
  pinMode(led, OUTPUT) // Declare the LED as an output
}
void loop()
{
  digitalWrite(led, HIGH) // Turn the LED ON
  delay(1000); // Wait for 1 Second
  digitalWrite(led, LOW) // Turn the LED OFF
  delay(1000); // Wait for 1 Second
}

Step3:
If you are using Arduino UNO board, then the 13th pin of the board has an inbuilt LED. Now if you upload the program to the board, the LED will be turning ON/OFF with 1 second delay.
You can use a 220 Ohm Resistor with LED.

Connections : 
Fritzing bb umhghz8o9v

Thank you!

In case of any questions or queries, feel free to post below.

Subscribe to our YouTube Channel and check out other tutorials of DIY projects.

Leave a Reply

SHOPPING CART

close