I have an array of six character strings (not Strings), and want to print them out. This doesn't work:
const int samples = 6;
const int datasize = 17;
int x, y;
char data[samples][datasize+1] = {
"11110000001011000",
"00110000001011000",
"11110000100100101",
"00110000100100101",
"11110000100100110",
"00110000100100110"
};
void setup() {
delay(2000);
Serial.begin(9600);
Serial.println();
for (x = 0; x < samples; x++); {
for (y = 0; y < datasize; y++) {
Serial.print(data[x][y]);
}
Serial.println();
}
}
void loop() {
}
I get seven non-printable characters. Can anyone suggest how to make this work on a Nano? It's funny because I can extract each character with no problem by treating this as a normal two-dimentional array. I just can't get them to print out to look just like the input.