LED Blinking


Arduino Uno LED Blinking tutorial

LED Blinking project is knows as the first project of arduino programming. 


In this project we will learn arduino basic  programming. and how to use any digital pin of the arduino as an input or output.

how to get a command it will be High( 5 volts output) or Low ( 0 volt output).

What is LED? 

LED is a small power light emitting diode that is emite the light when power supply given. it have two terminals one is anode and cathode. 


Components required for this project 

Arduino Uno R3

 LED

Jumper wire 

Arduino programming cable. 


Code for LED Blinking - 

// led blinking 
void setup() {
  // put yuor setup code here ,to run once 
pinMode(12 , OUTPUT);  // led will be connnected pin No 12 of the arduino board
}
void loop() {
    // put your main code here , to run repeatedly
    
digitalWrite(12, HIGH);  

delay (2000);  // wait for two second

digitalWrite(12, LOW);

 delay(1000);              // wait for a second

}


Program view in Arduino Droid App Using mobile App




 

Note from program 

pinMode () ;

Syntax of pin pinMode function :-

configure the specified pin to be have either as an output or input. 

pinMode (Pin No, Mode);

Mode - INPUT /OUTPUT 

pinMode (2,OUTPUT) ;    We can used any digital pin of the arduino uno board as a input pin or output pin.

Before use of any digital pin of the arduino we need to tell arduino whether it is use as an input or output. 

that function called

pinMode () ;


digitalWrite () ;

Syntax of digitalWrite () ; function
 
digitalWrite (Pin No, Value) ;

Value - HIGH/LOW   
  
HIGH =05 Volts 
LOW  =0 Volt 

digitalWrite (2,HIGH);   When we are using any digital pin of the arduino as a output then we will get a command it will be HIGH or LOW 

After watching the following video you can understand the above arduino program for LED blinking. 













Previous Post Next Post