Back to Parent

int ledPin = D2; // initialize pin D2 where LED is connected to

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 = 1; i < 6; i++){
    digitalWrite(ledPin, HIGH);   // Turn ON the LED pins
    delay(500); // Wait for 500mS = 0.5 seconds
    digitalWrite(ledPin, LOW);   // Turn OFF the LED pins
    delay(500); // Wait for 500mS = 0.5 seconds

  }
  
  digitalWrite(ledPin, LOW);   // Turn OFF the LED pins
  delay(3000);  // Wait for 3000mS = 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