Hi All,
I have a 2D constant array that I want to save in program memory and I want to use SPI.transfer(buffer, size). The problem is that when I try to do this with PROGMEM my loop() works once then the SPI command fails to send. If I save in ram by taking out PROGMEM then the loop works.
This is a code example to show what I mean.
const char buffer[4][10] PROGMEM={};
void loop() {
i=0;
while(i<4){
Serial.print( i);
i++;
SPI.transfer(&buffer[i][0],10);
delay(1000 );
}
}
Serial.print will still work but SPI.transfer will not work after loop() loops the first time. Im using hardware SPI and Arduino Uno if it helps.
Has anyone seen this before? Am I using SPI.transfer the right way? Might this be a addressing problem?
Cheers!