Back to Parent

int ledPin = D2;

void setup() {
    
    pinMode(ledPin, OUTPUT);
}

void loop() {
    int i = 5;
    while ( i > 0 ){
        digitalWrite(ledPin, HIGH); // blink the led for 5 times
        delay(500);
        digitalWrite(ledPin, LOW);
        delay(500);
        i = i - 1;
    }
    delay(2500); // stop for 3 seconds
}
Click to Expand

Content Rating

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

0