#define Ledmerah 2
void setup() {
pinMode(Ledmerah, OUTPUT);
}
void lampu_kedip() {
digitalWrite(Ledmerah, HIGH);
delay(1000);
digitalWrite(Ledmerah, LOW);
delay(1000);
}
void loop() {
// put your main code here, to run repeatedly:
int count = 0; // Initialize a counter
do {
lampu_kedip(); // Call the function to blink the LED
delay(1000); // Delay between each blink
count++; // Increment the counter
} while (count < 5); // Continue as long as count is less than 5
}