Now the code I'm writing in Arduino (Using Arduino) uses multiple 2-dimensional arrays. Now when I print some thing using the Serial Monitor it prints it correctly but when I declare and initialize the 2-dimentional array it won't print it.
Code:
void setup()
{
Serial.begin(9600);
int image_width = 56;
int image_height = 96;
int image_result[image_width][image_height];
for (int i=0; i<image_height; i++) {
for (int j=0; j<image_width; j++) {
image_result[j][i] = 5;
}
}
Serial.print("code works");
}
Now in this case "code works" does not print but when I remove the array declaration and initialization code works is printed. What is the problem?
Do 2 dimensional arrays work differently in Arduino or is it a space issue?