Back to Parent

int ledPin = D2;

void setup() {
      // We want to tell the Argon that we'll use
      // D2 as an output pin.
    pinMode(ledPin, OUTPUT);
}

void loop() {
    // loop to turn LED on 5 times
    for (int i= 0; i<5; i++){
    digitalWrite( ledPin, HIGH ); //turn LED on
    delay(500); //wait for 0.5 second
    digitalWrite( ledPin, LOW ); //turn LED off
    delay(500); //wait for 0.5 second
    }  
    delay(3000); // wait for 3 seconds
//rinse + repeat

}
Click to Expand

Content Rating

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

0