Quantcast
Channel: Arduino Forum - Latest topics
Viewing all articles
Browse latest Browse all 15346

Trying to make a 4*4 with multidimensional array

$
0
0
int led[4][4]={{2,3,4,5},{6,7,8,9}};
void setup() {
  for(int i = 2; i<=10;i++)
  {
   pinMode(i,OUTPUT);
  }
  // put your setup code here, to run once:

}

void loop() {
  for(int rows = 2; rows <= 5; rows++)
  {
    
    
    for(int colums = 6; colums <= 9; colums++)
    {
      
      digitalWrite(led[rows][colums],HIGH);
      delay(500);
      digitalWrite(led[rows][colums],LOW);
    }
  }
  // put your main code here, to run repeatedly:

}

this is my code what am i doing wrong?

6 posts - 5 participants

Read full topic


Viewing all articles
Browse latest Browse all 15346

Trending Articles