Hi
I am working on a larger project but the root problem right now is storing large arrays to work with. They are small enough that I can use the flash memory (Progmem) but this is where my problem comes up.
I keep getting errors when trying to save them to flash when defining the size of the array. If I do not define the array size it seems to work but then I can not seem to read the values back after I do.
Below is my code, I can not see anything obvious so I must be misunderstanding something. Any help will be greatly appreciated.
#include <avr/pgmspace.h>
int i = 0;
const int test[] PROGMEM = {
4, 5, 6, 7, 8, 9, 10, 11, 12, 1, 2, 3
};
void setup() {
Serial.begin(9600); // sets serial baud rate to 9600
}
void loop() {
Serial.println(test);
Serial.print(" ");
i++;
if(i == (sizeof(test)-1)) // Reset the counter to repeat the wave
i = 0;
delay(100);
}