I am running a for loop in a two-dimensional array and saving that array value in a string. But I need to send that data to the server and display it in a web page later, so my plan is to concatenate a "]" after the end of a 2-dimensional array so I know which is the first column of data. and each value should be separated by commas.so output should be like this
21041D342895,59,2]
8647234AF0D0,59,1]
So Here What I Did
String maclist[64][3]; in this array Data is present
String MacToEsp32 = "";
//===== LOOP =====//
void loop() {
for(int i=0;i<=10;i++){
for(int j=0;j<=2;j++){
if(!(maclist[i][j] == "")){
String Data = maclist[i][j];
MacToEsp32 +=Data + ",";
delay(100);
}
}
MacToEsp32 +="]";
}
Serial.println(MacToEsp32);
}
And I am getting an output as
]]]]]]]]]]]B21041DB2895,59,1,]]]]]]]]]]]B21041DB2895,59,2,]1864726AF0D0,59,1,]1864726AF0D1,59,1,]1864726AF0D2,59,1,]C8B37347D63
And I am trying to get a data like this .
R21041DB2896,59,1]821041GB2885,59,2]186472ARFA,59,1]1864726ADSD1,59,1]18SDA6AF0D2,59,1]