You are on page 1of 1

Blink Turns on an LED on for one second, then off for one second, repeatedly.

This example code is in the public domain. */ // Pin 13 has an LED connected on most Arduino boards. // give it a name: int ledR= 12; int ledA= 11; int ledV= 10; int ledR2= 9; int ledA2= 8; int ledV2= 7; // the setup routine runs once when you press reset: void setup() { // initialize the digital pin as an output. pinMode(ledR, OUTPUT); pinMode(ledA, OUTPUT); pinMode(ledV, OUTPUT); pinMode(ledR2, OUTPUT); pinMode(ledA2, OUTPUT); pinMode(ledV2, OUTPUT); digitalWrite(ledR, LOW); digitalWrite(ledA, LOW); digitalWrite(ledV, LOW); digitalWrite(ledR2, LOW); digitalWrite(ledA2, LOW); digitalWrite(ledV2, LOW); } // the loop routine runs over and over again forever: void loop() { digitalWrite(ledR, HIGH); // turn the LED on (HIGH is the voltage level) digitalWrite(ledV2, HIGH); delay(9000); // wait for a second digitalWrite(ledR, HIGH); // turn the LED off by making the voltage LOW digitalWrite(ledA2, HIGH); digitalWrite(ledV2, LOW); delay(3000); // wait for a second digitalWrite(ledA2, LOW); digitalWrite(ledV, HIGH); digitalWrite(ledR2, HIGH); digitalWrite(ledR, LOW); delay(9000); digitalWrite(ledR2, HIGH); digitalWrite(ledV, LOW); digitalWrite(ledA, HIGH); delay(3000); digitalWrite(ledR2, LOW); digitalWrite(ledA, LOW); }