I'm working with one array who has values multiples values, when one value it's bigger than 255 the count start form 0 again, example 256=0.
I thouhg it can be the flash memmory so I began to use the EEPROM but I still have the same problem, here is the code,
include <EEPROM.h>
const int tablaGC[]={50,100,150,200,250,255,255,256,257,258,259,50,100,150,200,250,255,255,256,257,258,259,260}; //0,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100,110,115,120,125,130,135Arreglo con los valores segun la tabla de grados centigrados segun tabla tipo k
int const *p;
int total=27;
void setup()
{
int direc=0,valor;
Serial.begin(9600);
/* Clear the memory ofth EEPROM of Arduino*/
for (int i = 0; i < 512; i++)
{
EEPROM.write(i, 0);
}
delay(100);
Serial.println("Inicia el guardado en EEPROM");
for(int i =0; i<=sizeof(tablaGC);i++)
{
valor=*(p+direc);
EEPROM.write(direc, tablaGC[direc]);
direc=direc +1;
delay(10);
//if(direc == 255){direc=0;}
}
delay(2000);
}
void loop()
{
Serial.println("Lectura de la EEPROM");
for(int i=0; i<total; i++)
{
Serial.println(EEPROM.read(i));
delay(1000);
}
}
The values 256,257,258 and 259 shows as 0,1,2,3,4
Hope anyone can help me, I don't know what's the problem
Thanks