Hello, I am new to this form and I have been working with Arduino for a month now. I has been a great experience so far even with my limited knowledge of C.
I am however having great difficulties now trying to work with 3 dimensional arrays. After doing a fair amount of googling I am curious if the arduino C compiler supports 3D arrays at all?
as well as this post which i cant quite understand:
https://code.google.com/p/arduino/issues/detail?id=233#c1
I have noticed that there is another post on this forum discussing the initialization of a 3D array.
However I have tried using the code suggested in the followup post and cannot get it to work. The code compiles without error, however my serial terminal does not show any data, it is only spammed with "test"
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1220238747
The code I am using to test with.
boolean patterns[2][4][4]=
{
{
{1, 1, 1, 1},
{1, 1, 1, 1},
{1, 1, 1, 1},
{1, 1, 1, 1}
},
{
{0, 0, 0, 0},
{0, 0, 0, 0},
{0, 0, 0, 0},
{0, 0, 0, 0}
}
};
void setup() {
Serial.begin(115200);
}
void loop() {
Serial.print("test");
Serial.println(patterns[0][2][2]);
delay(1000);
}
What my terminal shows:
"test
test
test
test
test
test
test
test
test
"
However my serial terminal does not display that matrix like symbol after the "test" text that just appeared when I pasted the output of the serial terminal in here. :-?