Pages: [1]   Go Down
Author Topic: Arreglo de dos dimensiones  (Read 1138 times)
0 Members and 1 Guest are viewing this topic.
México
Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hola que tal, espero me puedan ayudar!
Tengo dos problemas que se me presentaron con el siguiente código.

Code:
String familia[51][3]={
  {"0496CC8","3F0496CC8","3F048"},
  {"3F00D2496CC8","3F0496CC8","3F04968"},
  {"0496CC8","3F0496CC8","3F0v48"},
  {"0v496CC8","3F0496CC8","3F0v48"},
  {"04v96CC8","3F0496CdC8","3Fv048"},
  {"049v6CC8","3F0496dCC8","3F0v48"},
  {"0496vvCC8","3F049d6CC8","3F0b48"},
  {"04xx96CC8","3F04d96CC8","3F0bv48"},
  {"049x6CC8","3F0496CC8","3F04b8"},
  {"049xx6CC8","3F0496CC8","3Fb048"},
  {"049x6CC8","3F0496CCd8","3Fb048"},
  {"049x6CC8","3F0496CC8","3F04b8"},
  {"049x6CC8","3F0496CdC8","3F048"},
  {"049x6CC8","3F0496CC8","3F0b48"},
  {"0496CC8","3F0496fCC8","3Fn048"},
  {"04h96CC8","3F0b4b96CC8","3nF048"},
  {"04h96CC8","3Fb0496CC8","3F04b8"},
  {"04h96CC8","b3F0496CC8","3F0v48"},
  {"04h96CC8","3F0496CC8","3F0bn48"},
  {"04h96CC8","3Fb0496CC8","3Fn048"},
  {"04h96CC8","3F0496CC8","3F0bb48"},
  {"04h96CC8","3Fn0496CC8","3F0b48"},
  {"049h6CC8","3Fn0496CC8","3F0b48"},
  {"049h6CC8","3Fn0496CC8","3Fbb048"},
  {"049h6CC8","3Fn0496CC8","3F04b8"},
  {"04kk96CC8","3F0n496CC8","3Fb048"},
  {"049k6CC8","3Fn0496CC8","3F048"},
  {"049k6CC8","3F0496CC8","3F0n48"},
  {"049k6CC8","3Fn0496CC8","3F0b48"},
  {"049k6CC8","3Fn0496CC8","3F0n48"},
  {"049k6CC8","3F0496CC8","3F0n48"},
  {"0496kCC8","3F,m0496CC8","3F0n48"},
  {"0496kkCC8","3F,0496CC8","3F0nn48"},
  {"0496kCC8","3F,0496CC8","3F04b8"},
  {"0496kCC8","3F,0496CC8","3F0b48"},
  {"0496CkkC8","3F0496CC8","3F048"},
  {"0496CC8","3F,0496CC8","3F0j48"},
  {"0l496CC8","3F,0496CC8","3Fj048"},
  {"0l496CC8","3F,0496CC8","3F048j"},
  {"0l496CC8","3F,0496CC8","3F04j8"},
  {"0l496CC8","3F0,496CC8","3F0j48"},
  {"04l96CC8","3F0496CC8","3F0jj48"},
  {"04l96CC8","3F0j496CC8","3F048"},
  {"04l96CC8","3F04m96CC8","3Fj048"},
  {"04l96CC8","3F0496CC8","3F0f48"},
  {"04ll96CC8","3F04b96CC8","3Fh048"},
  {"04l96CC8","3F04b96CC8","3F04h8"},
  {"049l6CC8","3F049g6CC8","3F0h48"},
};

void setup(){
  Serial.begin(9600);
}

void loop (){
  for(int i = 0; i < 51; i++){
    if(familia[i][0].equals("3F00D2496CC8") == true){
      Serial.println("Coincide... ");
    }
  }
}


  • El primero es porque razón no se hace la comparación entre los dos Strings.
  • La segunda es el porque no puedo pasar de un arreglo de 51 filas a uno que contenga 100 filas, siendo que cuando creo uno de 100 el arduino no responde.
Logged

Offline Offline
Edison Member
*
Karma: 23
Posts: 1375
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Probablemente en ambos casos hayas llenado la RAM del Arduino
Logged

Mercadillo electrónico. Kit iniciación a Arduino, shield LCD a color y más cosas!

México
Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Cierto,investigando también encontré que arduino tiene 2 Kb de SRAM que son utilizados para variables.. los cuales llene con el arreglo tan extenso. Gracias!
Logged

Pages: [1]   Go Up
Jump to: