Nabham Sharma
Published © GPL3+

Blinking of Two LEDs with the Delay of 0.5 Sec

Blink two LEDs with a 0.5 sec delay.

BeginnerShowcase (no instructions)54 minutes11,514
Blinking of Two LEDs with the Delay of 0.5 Sec

Things used in this project

Story

Read more

Code

blinking two led with the delay of 0.55 sec

Arduino
int led1=13;
int led2=12;
int i=0;
void setup()
{
  pinMode(13,OUTPUT);
  pinMode(12,OUTPUT);
  
}
void loop()
{
  for(i=0;i<=5;i++)
  {
  digitalWrite(13,HIGH);
  delay(50);
  digitalWrite(13,LOW);
  delay(50);
  }
  for(i=6;i<=10;i++)
  {
  digitalWrite(12,HIGH);
  delay(50);
  digitalWrite(12,LOW);
  delay(50);
  }
}

Credits

Nabham Sharma
1 project • 0 followers

Comments