Back to Parent

int ledPinYellow = D2;
int ledPinGreen = D3;


void setup() {
    // Tell the Argon that we'll use D2 as an output pin.
    pinMode(ledPinYellow, OUTPUT);
    pinMode(ledPinGreen, OUTPUT);
}


void loop() {
    // Turn on Yellow
    digitalWrite(ledPinYellow, HIGH);   // Turn ON the Yellow LED pin
    // Turn off Green
    digitalWrite(ledPinGreen, LOW);   // Turn OFF the Green LED pin
    
    delay(1000);               // Wait for 1000mS = 1 second
    
    // Turn on Green
    digitalWrite(ledPinGreen, HIGH);   // Turn ON the Green LED pin
    // Turn off Yellow
    digitalWrite(ledPinYellow, LOW);   // Turn OFF the Yellow LED pin
    
    delay(1000);               // Wait for 1000mS = 1 second
    
    // Repeat
}
Click to Expand

Content Rating

Is this a good/useful/informative piece of content to include in the project? Have your say!

0