Hackster is hosting Impact Spotlights: Industrial Automation. Watch the stream live on Thursday!Hackster is hosting Impact Spotlights: Industrial Automation. Stream on Thursday!
Sümeyye Varmış
Published

Arduino 2 Led Blink

We will light up two LEDs connected to Arduino at different intervals. One LED will light up 10 times in 1 second, while the other LED will

BeginnerProtip6,681
Arduino 2 Led Blink

Things used in this project

Story

Read more

Custom parts and enclosures

circuit diagram

circuit diagram

Arduino Code

code on arduino

Schematics

circuit diagram

circuit diagram

Code

Arduino Code

C/C++
code on arduino
int a = 0;
void setup() {
  // put your setup code here, to run once:
  pinMode(2,OUTPUT);
  pinMode(3,OUTPUT);
}

void loop() {
  // put your main code here, to run repeatedly:
  digitalWrite(2,1);
  delay(50);
  digitalWrite(2,0);
  delay(50);
  a++;
  if(a>5){
    digitalWrite(3,1);
  }
  if(a>10){
    a=0;
    digitalWrite(3,0);
  }
}

Credits

Sümeyye Varmış
2 projects • 1 follower
Contact

Comments

Please log in or sign up to comment.