Lab1 - Blazing LED

 

/*
  Blink Blaze
  Turns an LED on and off at incresingly rapid rates!
 
  This example code is in the public domain.
 */
 
void setup() {                
  // initialize the digital pin as an output.
  // Pin 13 has an LED connected on most Arduino boards:
  pinMode(13, OUTPUT);     
}
 
void loop() {
  for(int i=50; i--; i>=0) {
    digitalWrite(13, HIGH);   // set the LED on
    delay(5*i);              // wait for 5*i seconds
    digitalWrite(13, LOW);    // set the LED off
    delay(5*i);              // wait for 5*i seconds
  }
}
Arduino - Blazing LED
5
Your rating: None Average: 5 (1 vote)