user53837: I am having a byte array let us say
byte arr[7]={123456};

How to compare this array with a list of of other array like this for example
byte  buffers[5][7] = {123456,654321,987654,456789,765432};

if this method is wrong how can I declare that ? 

user21371: byte arr[7]={123456};

sets arr[0] = 64 - which is 123456 % 256 - and arr[1-6] are left at 0
And you also only want 6 (not 7) values - so the code would be
byte arr[6]={1,2,3,4,5,6}; // this is how to initialise an array
byte  buffers[5][6] = {{1,2,3,4,5,6},{6,5,4,3,2,1},{9,8,7,6,5,4},{4,5,6,7,8,9},{7,6,5,4,3,2}}; // this is how to initialise a 2d array

void setup() {
  Serial.begin(74880);
  delay(100);
  // this code will find a match, the vlaue of `i` will be the matched index
  int i;
  int j;
  for(i = 0; i < 5; i++) {
    for(j = 0; j < 6; j ++) {
      if(arr[j] != buffers[i][j]) {
        break;
      }
    }
    if(j == 6) {
      break;
    }
  }
  if (i < 5) {
    Serial.print("Found at index ");
    Serial.println(i);
  }

}


53837: <p>I am having a byte array let us say</p>

<pre><code>byte arr[7]={123456};
</code></pre>

<p>How to compare this array with a list of of other array like this for example</p>

<pre><code>byte  buffers[5][7] = {123456,654321,987654,456789,765432};
</code></pre>

<p>if this method is wrong how can I declare that ? </p>
 21371: <pre><code>byte arr[7]={123456};
</code></pre>

<p>sets arr[0] = 64 - which is 123456 % 256 - and arr[1-6] are left at 0</p>

<p>And you also only want 6 (not 7) values - so the code would be</p>

<pre><code>byte arr[6]={1,2,3,4,5,6}; // this is how to initialise an array
byte  buffers[5][6] = {{1,2,3,4,5,6},{6,5,4,3,2,1},{9,8,7,6,5,4},{4,5,6,7,8,9},{7,6,5,4,3,2}}; // this is how to initialise a 2d array

void setup() {
  Serial.begin(74880);
  delay(100);
  // this code will find a match, the vlaue of `i` will be the matched index
  int i;
  int j;
  for(i = 0; i &lt; 5; i++) {
    for(j = 0; j &lt; 6; j ++) {
      if(arr[j] != buffers[i][j]) {
        break;
      }
    }
    if(j == 6) {
      break;
    }
  }
  if (i &lt; 5) {
    Serial.print("Found at index ");
    Serial.println(i);
  }

}
</code></pre>
