int ledPin1 = D2;
int ledPin2 = D5;
void setup() {
// We want to tell the Argon that we'll use D2 and D5 as output pins.
pinMode( ledPin1, OUTPUT);
pinMode( ledPin2, OUTPUT);
}
void loop() {
digitalWrite( ledPin1, HIGH ); //turn LED1 on
digitalWrite( ledPin2, LOW ); //turn LED2 off
delay(2000); //wait for 2 second2
digitalWrite( ledPin1, LOW ); //turn LED1 off
digitalWrite( ledPin2, HIGH ); //turn LED2 on
delay(2000); //wait for 2 second2
// rinse + repeat
}
Click to Expand
Content Rating
Is this a good/useful/informative piece of content to include in the project? Have your say!
You must login before you can post a comment. .