int led = 13;
int led2 = 12;
int led3 = 11;
int led4 = 10;
// the setup routine runs once when you press reset:
void setup() {
// initialize the digital pin as an output.
pinMode(led, OUTPUT);
pinMode(led2, OUTPUT);
pinMode(led3, OUTPUT);
pinMode(led4, OUTPUT);
}
// the loop routine runs over and over again forever:
void loop() {
digitalWrite(led2, HIGH); // turn the LED on (HIGH is the voltage level) // wait for one tenth of a second
digitalWrite(led3, HIGH); // turn the LED off by making the voltage LOW
delay(500);
digitalWrite(led2, LOW); // turn the LED on (HIGH is the voltage level) // wait for one tenth of a second
digitalWrite(led3, LOW); // turn the LED off by making the voltage LOW
digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level) // wait for one tenth of a second
digitalWrite(led4, HIGH); // turn the LED off by making the voltage LOW
delay(500);
digitalWrite(led, LOW); // turn the LED on (HIGH is the voltage level) // wait for one tenth of a second
digitalWrite(led4, LOW); // turn the LED off by making the voltage LOW
}
No comments:
Post a Comment