sorry, my bad. by doing this, the array goes into FLASH memory:
const unsigned char normal[] PROGMEM = {132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 126, 128, 126, 128, 128, 128, 126, 128, 126, 128, 126, 128, 126, 128, 126, 128, 126, 128, 126, 128, 126, 126, 128, 126, 128, 126, 128, 126, 128, 126, 128, 128, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 126, 128, 126, 128, 126, 128, 126, 128, 126, 128, 126, 128, 128, 128, 128, 128, 126, 126, 128, 126, 128, 126, 128, 126, 128, 128, 126, 128, 132, 132, 132, 132, 132, 132, 132, 136, 136, 136, 132, 132, 132, 132, 132, 132, 132, 132, 126, 128, 128, 126, 128, 126, 128, 126, 128, 126, 128, 128, 126, 128, 126, 128, 126, 128, 128, 128, 128, 128, 126, 128, 128, 126, 132, 132, 132, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 132, 132, 132, 132, 132, 126, 126, 128, 126, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 126, 128, 126, 128, 126, 128, 132, 132, 136, 136, 141, 145, 145, 150, 150, 150, 150, 150, 150, 150, 145, 145, 141, 136, 132, 132, 126, 122, 122, 118, 118, 113, 113, 113, 113, 113, 113, 113, 118, 118, 118, 122, 122, 122, 122, 122, 126, 128, 128, 126, 132, 136, 141, 150, 159, 163, 168, 172, 177, 181, 181, 181, 181, 177, 172, 168, 159, 150, 145, 136, 128, 122, 118, 109, 104, 104, 100, 100, 100, 100, 100, 104, 104, 109, 109, 113, 113, 118, 118, 122, 122, 122, 128, 128, 132, 150, 163, 186, 208, 230, 248, 255, 255, 255, 255, 255, 255, 255, 255, 235, 221, 199, 177, 154, 132, 118, 100, 86, 73, 64, 59, 55, 55, 59, 64, 68, 73, 82, 91, 95, 104, 109, 113, 118, 122, 128, 126, 132, 132, 136, 159, 172, 195, 221, 244, 255, 255, 255, 255, 255, 255, 255, 255, 255, 239, 221, 199, 177, 154, 128, 113, 95, 77, 68, 59, 55, 51, 55, 59, 60, 68, 73, 82, 91, 95, 104, 109, 113, 118, 118, 122, 122, 122, 122, 132, 154, 168, 190, 217, 244, 255, 255, 255, 255, 255, 255, 255, 255, 255, 244, 226, 199, 177, 154, 128, 113, 95, 77, 68, 55, 55, 51, 51, 55, 60, 64, 68, 77, 86, 91, 95, 104, 109, 118, 122, 128, 132, 132, 136, 136, 154, 177, 195, 221, 248, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 230, 208, 186, 163, 136, 113, 95, 82, 68, 55, 51, 46, 42, 46, 51, 55, 64, 68, 82, 91, 104, 113, 122, 132, 141, 145, 154, 154, 159, 159, 168, 190, 203, 221, 244, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 239, 217, 195, 172, 150, 126, 109, 91, 77, 64, 60, 55, 55, 55, 59, 64, 73, 82, 91, 104, 113, 126, 136, 141, 150, 154, 159, 159, 163, 159, 159, 177, 194, 208, 226, 244, 255, 255, 255, 255, 255, 255, 255, 253, 239, 226, 208, 190, 177, 159, 145, 132, 118, 109, 100, 91, 86, 86, 82, 82, 82, 82, 91, 91, 95, 100, 104, 113, 118, 118, 122, 128, 132, 136, 136, 136, 141, 177, 208, 217, 239, 255, 255, 255, 255, 255, 255, 255, 244, 217, 208, 195, 186, 163, 150, 141, 132, 122, 104, 95, 91, 82, 73, 64, 64, 64, 64, 60, 64, 68, 77, 82, 82, 91, 100, 109, 109, 113, 122, 128, 136, 136, 145, 203, 253, 248, 255, 255, 255, 255, 248, 212, 203, 203, 190, 163, 159, 159, 159, 150, 122, 109, 104, 95, 68, 55, 51, 55, 55, 51, 51, 64, 73, 77, 77, 82, 95, 95, 109, 104, 118, 132, 141, 145, 150, 168, 172, 181, 172, 253, 255, 255, 255, 255, 255, 255, 255, 203, 172, 172, 172, 159, 132, 122, 118, 128, 91, 59, 33, 28, 24, 10, 6, 1, 33, 46, 55, 60, 73, 86, 100, 104, 104, 118, 136, 150, 163, 168, 177, 190, 195, 195, 190, 186, 181, 253, 255, 255, 255, 255, 255, 255, 253, 190, 141, 128, 122, 132, 126, 104, 95, 95, 82, 59, 33, 10, 6, 19, 19, 33, 42, 64, 77, 100, 100, 95, 100, 100, 118, 128, 145, 150, 168, 181, 190, 195, 190, 186, 177, 172, 172, 235, 255, 255, 255, 255, 255, 239, 226, 186, 150, 118, 104, 118, 132, 132, 118, 95, 68, 55, 42, 24, 15, 15, 19, 37, 59, 82, 91, 100, 100, 100, 109, 113, 128, 136, 150, 159, 177, 181, 190, 190, 190, 177, 177, 163, 163, 221, 255, 255, 255, 255, 253, 208, 190, 168, 154, 136, 113, 109, 122, 132, 132, 118, 77, 37, 10, 6, 15, 37, 55, 68, 77, 82, 91, 100, 104, 104, 104, 109, 118, 136, 154, 172, 181, 186, 181, 177, 172, 168, 168, 159, 159, 217, 255, 255, 255, 255, 255, 190, 154, 132, 145, 150, 145, 132, 122, 113, 104, 104, 82, 59, 28
};
If i have like 5 of these, the arduino doesn't power up.
And actually using strings like this:
Serial.println("Waiting for information");
The string between "" goes into SRAM. So I'm using F() to keep them into flash. And this is the issue. Combining the arrays and Strings, my FLASH usage is 30%, which makes the Mega crash. If I remove a single array, making the flash 28% full, it powers up and runs perfectly.
The huge arrays are PCM audios, by the way. And after declaring, all I'm doing is playing them using PCM Library.
startPlayback(normal, sizeof(normal));
delay(sizeof(normal)/8);
Thanks