void setup() {
  // put your setup code here, to run once:
  Serial.begin(115200);
  Serial.println("Hello, ESP32!");

  pinMode(26, OUTPUT);
  int8_t  kedip = 0;
  const int16_t waktu = 500;
  const int8_t jumlah_kedip = 5;

  while(1){
    runKedip(waktu);
    // kedip++;
    // kedip += 1;

    kedip = kedip + 1;

    if(kedip>=jumlah_kedip){
      break;
    }

  }
 
  digitalWrite(26, LOW);
}

void runKedip(int16_t waktu){
  aktifkanPIN(26, LOW);
  delay(waktu);
  aktifkanPIN(26, HIGH);
  delay(waktu); 
}

void aktifkanPIN(int8_t pin, int8_t nilai){
  digitalWrite(pin, nilai);
}

void loop() {
  // put your main code here, to run repeatedly:
  delay(10); // this speeds up the simulation
}