Description
Used the Arduino to turn an LED on and off at a specified rate.
Components Used
Arduino Uno
220 kohm resistor
Blue LED
Arduino Code (modified from Blink example)
/*
Blinking an LED
Turns on an LED on for 2 seconds, then off for 0.5 second, repeatedly.
This sketch is modified from example code found in the public domain.
Modified 31 April 2011
*/
void setup() {
// initialize the digital pin as an output.
pinMode(13, OUTPUT);
}
void loop() {
digitalWrite(13, HIGH); // set the LED on
delay(2000); // wait for 2 second
digitalWrite(13, LOW); // set the LED off
delay(500); // wait for .5 second
}