/* * Blink 3 in a row * * Adapted from the basic Arduino example. * 3 LEDs hooked up to pins 8, 9, and 10 are * blinked in succesion. * * rtwomey@ucsd.edu * */ int led1 = 8; // LED connected to digital pin 8 int led2 = 9; // LED connected to digital pin 9 int led3 = 10; // LED connected to digital pin 10 void setup() // run once, when the sketch starts { pinMode(led1, OUTPUT); // sets the digital pin as output pinMode(led2, OUTPUT); // sets the digital pin as output pinMode(led3, OUTPUT); // sets the digital pin as output } void loop() // run over and over again { digitalWrite(led1, HIGH); // sets the LED on delay(1000); // waits for a second digitalWrite(led1, LOW); // sets the LED off delay(1000); // waits for a second digitalWrite(led2, HIGH); // sets the LED on delay(1000); // waits for a second digitalWrite(led2, LOW); // sets the LED off delay(1000); // waits for a second digitalWrite(led3, HIGH); // sets the LED on delay(1000); // waits for a second digitalWrite(led3, LOW); // sets the LED off delay(1000); // waits for a second }