I have an array that I wish to program an eeprom - here is a bit of it :
const byte bufferOut[EepromSize] PROGMEM = {
96, 2, 165, 148, 235, 106, 150, 135, 1, 162, 192, 200, 63, 34, 214, 15, 19, 239.... etc
however, I get different results with the following two methods of reading this array.... and I can not see what I am missing !
char tmp[50];
sprintf(tmp,"%d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d\n\r",bufferOut[0],bufferOut[1],bufferOut[2],bufferOut[3],bufferOut[4],bufferOut[5],bufferOut[6],bufferOut[7],bufferOut[8],bufferOut[9],bufferOut[10]);
Serial.print(tmp);
for (int i = 0; i < 10; i++){
Serial.print(bufferOut[i]);
Serial.print(", ");
}
Serial.println("");
The output is :
96, 2, 165, 148, 235, 106, 150, 135, 1, 162, 192
0, 0, 184, 0, 0, 0, 1, 0, 0, 184
where the first line is correct and the second line is not.
![]()