LED blink assignment

albert_tjoeng's picture

 

Components Used:

LED, 220 ohm resistor, arduino board.

Arduino Code:

//This LED turn on for 1 second and then turn off for 0.2 second in a loop.

 

void setup() {                
  // initialize the digital pin as an output.
  pinMode(13, OUTPUT);     
}
 
void loop() {
  digitalWrite(13, HIGH);   // set the LED on
  delay(1000);              // wait for a second
  digitalWrite(13, LOW);    // set the LED off
  delay(200);              // wait for a 0.2 second
}
photo_5.JPG
0
Your rating: None