Lab1

Submitted by katehsiao on Wed, 01/30/2013 - 15:44

 

 

Description

Blinking LED, light for 0.5 second and dim for 0.5 second.
 

Components Used

1- Arduino Uno
1- Red LED
1- 220Ω Resistor
1- Breadboard
 
 

Code

 
int led = 13;
 
// the setup routine runs once when you press reset:
void setup() {                
  pinMode(led, OUTPUT);     
}
 
// the loop routine runs over and over again forever:
void loop() {
  digitalWrite(led, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(500);               // wait for 0.5 second
  digitalWrite(led, LOW);    // turn the LED off by making the voltage LOW
  delay(500);               // wait for 0.5 second
}
 

 

Lab1-1_0.jpeg
0
Your rating: None
Drupal theme by Kiwi Themes.