-6
int LED[] = {0,1,2,3,4,5,6,7,8,9}; // pin

void setup() {
  for (int i = 0; i < 20; i++) {
    pinMode(LED[i], OUTPUT);
  }
}


void loop() {
 kondisi_led(1,1,1,1,1,1,1,1,1,1);
  delay(500);
 kondisi_led(0,0,0,0,0,0,0,0,0,0);
  delay(500);
   kondisi_led(0,0,0,0,0,0,0,0,0,1);
  delay(500);
 kondisi_led(0,0,0,0,0,0,0,0,1,1);
  delay(500);
   kondisi_led(0,0,0,0,0,0,0,1,1,1);
  delay(500);
 kondisi_led(0,0,0,0,0,0,1,1,1,1);
  delay(500);
   kondisi_led(0,0,0,0,1,1,1,1,1,1);
  delay(500);
 kondisi_led(0,0,0,1,1,1,1,1,1,1);
  delay(500);
    kondisi_led(0,0,1,1,1,1,1,1,1,1);
  delay(500);
 kondisi_led(0,1,1,1,1,1,1,1,1,1);
  delay(500);
  kondisi_led(1,1,1,1,1,1,1,1,1,1);
  delay(500);
 kondisi_led(1,0,0,0,0,0,0,0,0,0);
  delay(500);
   kondisi_led(1,1,0,0,0,0,0,0,0,0);
  delay(500);
   kondisi_led(1,1,1,0,0,0,0,0,0,0);
  delay(500);
   kondisi_led(1,1,1,1,0,0,0,0,0,0);
  delay(500);
   kondisi_led(1,1,1,1,1,0,0,0,0,0);
  delay(500);
   kondisi_led(1,1,1,1,1,1,0,0,0,0);
  delay(500);
  kondisi_led(1,1,1,1,1,1,1,0,0,0);
  delay(500);
  kondisi_led(1,1,1,1,1,1,1,1,0,0);
  delay(500);
  kondisi_led(1,1,1,1,1,1,1,1,1,0);
  delay(500);
   kondisi_led(1,1,1,1,1,1,1,1,1,1);
  delay(500);
}

void kondisi_led(int LED1,int LED2,int LED3,int LED4,int LED5,int LED6,int LED7,int LED8,int LED9,int LED10,int LED11,int LED12,int LED13,int LED14,int LED15,int LED16,int LED17,int LED18,int LED19,int LED20){
  digitalWrite(LED[0], LED1);
  digitalWrite(LED[1], LED2);
  digitalWrite(LED[2], LED3);
  digitalWrite(LED[3], LED4);
  digitalWrite(LED[4], LED5);
  digitalWrite(LED[5], LED6);
  digitalWrite(LED[6], LED7);
  digitalWrite(LED[7], LED8);
  digitalWrite(LED[8], LED9);
  digitalWrite(LED[9], LED10);
  digitalWrite(LED[0], LED11);
  digitalWrite(LED[1], LED12);
  digitalWrite(LED[2], LED13);
  digitalWrite(LED[3], LED14);
  digitalWrite(LED[4], LED15);
  digitalWrite(LED[5], LED16);
  digitalWrite(LED[6], LED17);
  digitalWrite(LED[7], LED18);
  digitalWrite(LED[8], LED19);
  digitalWrite(LED[9], LED20);
}

closed as off-topic by Kamil Maciorowski, Máté Juhász, Tetsujin, Ramhound, Mokubai Sep 11 at 12:03

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question is not about computer hardware or software, within the scope defined in the help center." – Kamil Maciorowski, Máté Juhász, Tetsujin, Ramhound, Mokubai
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    programming questions are on topic on stackoverflow.com, not here. Before asking it there, please make sure you have a valid question (e.g. it's not clear what's actually your problem with that code). – Máté Juhász Sep 11 at 11:52

Browse other questions tagged or ask your own question.