blinking LEDs and circuit 03

[vimeo 52050555 w=500 h=281]

blinking LEDs from Connie D on Vimeo.

int L1 = 13;    // LED connected to digital pin 13
int L2 = 12;    // LED connected to digital pin 12
int L3 = 11;    // LED connected to digital pin 11
int L4 = 10;
int L5 = 9;
int L6 = 8;
int L7 = 7;
int L8 = 6;
int L9 = 5;
int L10 = 4;

// The setup() method runs once, when the sketch starts

void setup()   {                
  // initialize the digital pin as an output:
  pinMode(L1, OUTPUT);
  pinMode(L2, OUTPUT);
  pinMode(L3, OUTPUT);
  pinMode(L4, OUTPUT);
  pinMode(L5, OUTPUT);
  pinMode(L6, OUTPUT);
  pinMode(L7, OUTPUT);
  pinMode(L8, OUTPUT);
  pinMode(L9, OUTPUT);
  pinMode(L10, OUTPUT);
}

// the loop() method runs over and over again,
// as long as the Arduino has power

void loop()                    
{
  digitalWrite(L1, HIGH);   // set the LED on
  delay(100);  // wait for a second
  digitalWrite(L1, LOW);
  digitalWrite(L2, HIGH);   // set the LED on
  delay(100);                  // wait for a second
  digitalWrite(L2, LOW);
  digitalWrite(L3, HIGH);    // set the LED off
  delay(100);   
  digitalWrite(L3, LOW);
  digitalWrite(L4, HIGH);
  delay(100);    
  digitalWrite(L4, LOW);
  digitalWrite(L5, HIGH);
  delay(100);    
  digitalWrite(L5, LOW);
  digitalWrite(L6, HIGH);
  delay(100);    
  digitalWrite(L6, LOW);
  digitalWrite(L7, HIGH);
  delay(100);    
  digitalWrite(L7, LOW);
  digitalWrite(L8, HIGH);
  delay(100);    
  digitalWrite(L8, LOW);
  digitalWrite(L9, HIGH);
  delay(100);
  digitalWrite(L9, LOW);
  digitalWrite(L10, HIGH);
  delay(100);
  digitalWrite(L10, LOW);
  digitalWrite(L9, HIGH);
  delay(100);
  digitalWrite(L9, LOW);
  digitalWrite(L8, HIGH);
  delay(100);
  digitalWrite(L8, LOW);
  digitalWrite(L7, HIGH);
  delay(100);
  digitalWrite(L7, LOW);
  digitalWrite(L6, HIGH);
  delay(100);
  digitalWrite(L6, LOW);
  digitalWrite(L5, HIGH);
  delay(100);
  digitalWrite(L5, LOW);
  digitalWrite(L4, HIGH);
  delay(100);
  digitalWrite(L4, LOW);
  digitalWrite(L3, HIGH);
  delay(100);
  digitalWrite(L3, LOW);
  digitalWrite(L2, HIGH);
  delay(100);
  digitalWrite(L2, LOW);
}

[vimeo 52050556 w=500 h=281]

circuit 03 from Connie D on Vimeo.

Post a comment