Arduino Blinking LED Code

This example (Arduino Blinking LED Code) uses the built-in LED that most Arduino and Genuino boards have. This LED is connected to a digital pin and its number may vary from board type to board type. You Can just Copy this code and paste it in arduino software see my video for detail.

If you want to lit an external LED with this sketch, you need to build this circuit, where you connect one end of the resistor to the output digital pin. Connect the long leg of the LED (the positive leg, called the anode) to the other end of the resistor. Connect the short leg of the LED (the negative leg, called the cathode) to the GND. In the diagram below we show an UNO board that has D13 as the output pin.

The value of the resistor in series with the LED may be of a different value than 220 ohm; the LED will lit up also with values up to 1K ohm.

Connectivity of LED With Arduino UNO

arduino Blinking LED Code

Arduino Blinking LED Code

Add Your Heading Text Here

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

}

void loop() {
  digitalWrite(13,HIGH);
  delay(1000);
  digitalWrite(13,LOW);
  delay(1000);
 

}

In this article, I will explain how to interface LM35 and Arduino along with its program. Once we successfully interface arduino and lm35, we will go on to build a temperature display Read More…..

Click Here To Buy

Watch Video For Detail

error: Content is protected !!
Scroll to Top