Alternately Blink two LEDs. Requires the
addition of a single LED to Blink. Drive one LED HIGH while the other LED is
driven LOW, delay, and reverse the situation --- Simple.
------------ Copy Code below ---------------
void setup() {
pinMode(13, OUTPUT);
pinMode(12, OUTPUT);
}
void loop() {
digitalWrite(13, HIGH);
digitalWrite(12, LOW);
delay(1000);
digitalWrite(13, LOW);
digitalWrite(12, HIGH);
delay(1000);
}
------------ Copy Code above ---------------
No comments:
Post a Comment