Back to Parent

Updated loop for 5 blinks and then 3 second pause (using both lights)
void loop() {
for (int blinks = 0; blinks < 5; blinks++) {
digitalWrite(ledPin, HIGH); // Turns the led pin on
digitalWrite(bluePin, LOW);
delay(500); // Waits 500ms (0.5 second)
digitalWrite(ledPin, LOW); // Turns off the led pin
digitalWrite(bluePin, HIGH);
delay(500); // Waits 500ms (0.5 second) before starting the next step
}
digitalWrite(bluePin, LOW); //Turns off blue led pin
delay(3000); // Pauses for 3 seconds
}

Content Rating

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

0