// UNO kec 16 Mhz = 16.000.000 /detik
const uint8_t LED_PIN[5] = {13,11,9,7,6}; // inisialisasi pin
bool kondisi[5]={true,false,false,false,true};
void setup() {
// put your setup code here, to run once:
// taruh kode setingan kamu di sini, untuk dijalankan sekali
for(int i=0; i<5;i++){
pinMode(LED_PIN[i], OUTPUT);
}
}
void loop() { // prosedur,
// put your main code here, to run repeatedly:
// taruh kode utama kamu di sini, untuk dijalankan terus-menerus
for(int i=0; i<5; i++){
if(kondisi[i]==true){
digitalWrite(LED_PIN[i], HIGH);
} else {
digitalWrite(LED_PIN[i], LOW);
}
}
delay(1000);
for(int i=0;i<5;i++){
kondisi[i]=!kondisi[i];
}
}