I am trying log my sensor data (1 byte each) on my Arduino Uno Eeprom. I have an ATmega328 on it, so it should allow me to write up to 1Kb on it, however I've tried the Eeprom write command and it does not seem to write to more than 100 locations on it (the first 100 bytes!)
I am using the Eepromex library.
Any thoughts on what's causing this?
These are the excerpts from my code related to Eeprom logging:
int addr1 = 0; int addr2 = 256; // Store Data in EEPROM EEPROM.write(addr1,FinalMoisture); delay(5); EEPROM.write(addr2,FinalMoisture); delay(5); // advance index pointer to the next location. There are 256 bytes assigned for each sensor in the EEPROM, so go back to 0 when we hit 255/511. addr1 = addr1 + 1; if (addr1 == 255) addr1 = 0; //same for addr 2 : addr2 = addr2 + 1; if (addr2 == 511) addr2 = 256; // delay until next measurement (msec) Sleepy::loseSomeTime(30000);
PS: As mentioned earlier I've included the EepromEx library. Each sensor stores only first 50 locations. Also, I've noticed that if I run a single loop instead of storing data in two locations, I can write 100 straight entries. In any case it seems that the write function is limited to 100?
Could this be a setting in the library? How to disable/modify it? I tried looking at the info on the lib author's postings but didn't help.