Lab1
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
}
- Login to post comments
Drupal theme by Kiwi Themes.