Arduino Led Blinking

Updated: Sep 27, 2019



Led blinking program

Components Required:

1 x Arduino Board with USB cable


Arduino Schematic:

Every Arduino Board has an LED connected to the Pin number 13 by default, so there is no schematic needed here





Code:


int led = 13;  // every arduino board has an LED connected to pin 13 by default
void setup() 
{
  // put your setup code here, to run once:
  pinMode(led,OUTPUT);  // this makes the pin no 13 work as output, for input, replace OUTPUT with INPUT

}

void loop() 
{
  // put your main code here, to run repeatedly:
  digitalWrite(led,HIGH);        // turn ON LED 
  delay(100);
  digitalWrite(led,LOW);         // turn OFF LED 
  delay(100);
}




42 views0 comments

Recent Posts

See All