Simple LED chaser with Arduino Uno Board

Simple LED chaser with Arduino Uno Board


-- LEDs are connected to Pins#6,7,8,9,10
-- Series Resistors are not used
-- Single ground connection
-- White LEDs are used

void setup() {

  // put your setup code here, to run once:

  pinMode(6,OUTPUT);

  pinMode(7,OUTPUT);

  pinMode(8,OUTPUT);

  pinMode(9,OUTPUT);

  pinMode(10,OUTPUT);

}

void loop() {

  // put your main code here, to run repeatedly:

  digitalWrite(6,HIGH);

  delay(500);

  digitalWrite(7,HIGH);

  digitalWrite(6,LOW);

  delay(500);

  digitalWrite(8,HIGH);

  digitalWrite(7,LOW);

  delay(500);

  digitalWrite(9,HIGH);

  digitalWrite(8,LOW);

  delay(500);

  digitalWrite(10,HIGH);

  digitalWrite(9,LOW);

  delay(500);

  digitalWrite(10,LOW);

}

Post a Comment

0 Comments