int ledPin1 = D2; // initialize pin D2 where LED 1 is connected to
int ledPin2 = D3; // initialize pin D3 where LED 2 is connected to
void setup() {
// We want to tell the Argon that we'll use
// D2 and D3 as output pins.
pinMode(ledPin1, OUTPUT);
pinMode(ledPin2, OUTPUT);
}
void loop() {
digitalWrite(ledPin1, HIGH); // Turn ON the LED 1 pins
digitalWrite(ledPin2, LOW); // Turn OFF the LED 2 pins
delay(1000); // Wait for 3000mS = 3 seconds
digitalWrite(ledPin1, LOW); // Turn ON the LED 1 pins
digitalWrite(ledPin2, HIGH); // Turn OFF the LED 2 pins
delay(1000); // Wait for 3000mS = 3 seconds
}
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. .