/* * Araya's Valentine Heart * Heartbeat LED sketch */ int ledPin1 = 2; // LED connected to digital pin int ledPin2 = 3; // LED connected to digital pin int ledPin3 = 4; // LED connected to digital pin int ledPin4 = 5; // LED connected to digital pin int ledPin5 = 6; // LED connected to digital pin int ledPin6 = 11; // LED connected to digital pin int ledPin7 = 10; // LED connected to digital pin int ledPin8 = 9; // LED connected to digital pin int ledPin9 = 8; // LED connected to digital pin int ledPin10 = 7; // LED connected to digital pin void setup() // run once, when the sketch starts { pinMode(ledPin1, OUTPUT); // sets the digital pin as output pinMode(ledPin2, OUTPUT); // sets the digital pin as output pinMode(ledPin3, OUTPUT); // sets the digital pin as output pinMode(ledPin4, OUTPUT); // sets the digital pin as output pinMode(ledPin5, OUTPUT); // sets the digital pin as output pinMode(ledPin6, OUTPUT); // sets the digital pin as output pinMode(ledPin7, OUTPUT); // sets the digital pin as output pinMode(ledPin8, OUTPUT); // sets the digital pin as output pinMode(ledPin9, OUTPUT); // sets the digital pin as output pinMode(ledPin10, OUTPUT); // sets the digital pin as output } void loop() // run over and over again { // long blip digitalWrite(ledPin1, HIGH); // sets the LED on digitalWrite(ledPin6, HIGH); // sets the LED on delay(50); // waits for a split second digitalWrite(ledPin2, HIGH); // sets the LED on digitalWrite(ledPin7, HIGH); // sets the LED on delay(50); // waits for a split second digitalWrite(ledPin3, HIGH); // sets the LED on digitalWrite(ledPin8, HIGH); // sets the LED on delay(50); // waits for a split second digitalWrite(ledPin4, HIGH); // sets the LED on digitalWrite(ledPin9, HIGH); // sets the LED on delay(50); // waits for a split second digitalWrite(ledPin5, HIGH); // sets the LED on digitalWrite(ledPin10, HIGH); // sets the LED on delay(100); // waits for a split second digitalWrite(ledPin5, LOW); // sets the LED off digitalWrite(ledPin10, LOW); // sets the LED off delay(50 ); // waits for a split second digitalWrite(ledPin4, LOW); // sets the LED off digitalWrite(ledPin9, LOW); // sets the LED off delay(50); // waits for a split second digitalWrite(ledPin3, LOW); // sets the LED off digitalWrite(ledPin8, LOW); // sets the LED off delay(50); // waits for a split second digitalWrite(ledPin2, LOW); // sets the LED off digitalWrite(ledPin7, LOW); // sets the LED off delay(50); // waits for a split second digitalWrite(ledPin1, LOW); // sets the LED off digitalWrite(ledPin6, LOW); // sets the LED off delay(50); // waits for a split second //short blip digitalWrite(ledPin1, HIGH); // sets the LED on digitalWrite(ledPin6, HIGH); // sets the LED on delay(28); // waits for a split second digitalWrite(ledPin2, HIGH); // sets the LED on digitalWrite(ledPin7, HIGH); // sets the LED on delay(28); // waits for a split second digitalWrite(ledPin3, HIGH); // sets the LED on digitalWrite(ledPin8, HIGH); // sets the LED on delay(28); // waits for a split second digitalWrite(ledPin4, HIGH); // sets the LED on digitalWrite(ledPin9, HIGH); // sets the LED on delay(28); // waits for a split second digitalWrite(ledPin5, HIGH); // sets the LED on digitalWrite(ledPin10, HIGH); // sets the LED on delay(50); // waits for a split second digitalWrite(ledPin5, LOW); // sets the LED off digitalWrite(ledPin10, LOW); // sets the LED off delay(28); // waits for a split second digitalWrite(ledPin4, LOW); // sets the LED off digitalWrite(ledPin9, LOW); // sets the LED off delay(28); // waits for a split second digitalWrite(ledPin3, LOW); // sets the LED off digitalWrite(ledPin8, LOW); // sets the LED off delay(28); // waits for a split second digitalWrite(ledPin2, LOW); // sets the LED off digitalWrite(ledPin7, LOW); // sets the LED off delay(28); // waits for a split second digitalWrite(ledPin1, LOW); // sets the LED off digitalWrite(ledPin6, LOW); // sets the LED off delay(200); // pause between heartbeats }