jwhiddon / EDB

A re-implementation of the Arduino database library to allow more than 256 records
GNU Lesser General Public License v2.1
89 stars 43 forks source link

Adafruit Huzzah ESP8266 #16

Open ktorimaru opened 8 years ago

ktorimaru commented 8 years ago

Hi

I'm working with a Adafruit Huzzah ESP8266 board and I can't seem to get the EDBSimple and EDB_Internal_EEPROM examples to work. They both run on a Arduino Uno without issue. On the Huzzah they do not appear to either read or write properly (zeros are printed for both recon and temp).

Has anyone else had this problem? Any thoughts on a possible fix? Note that I have been successfully reading and writing to the EEPROM and I'm investigating EDB as a better storage approach.

Ken

ktorimaru commented 8 years ago

Found the problem! http://esp8266.github.io/Arduino/versions/2.0.0/doc/libraries.html

Need to EEPROM.begin(4096) and EEPROM.commit() after a write!

asjdf commented 5 years ago

I have the same problem.Could you tell me how to fix this problem?

I change

void writer(unsigned long address, byte data)
{
  EEPROM.write(address, data);
}

into

void writer(unsigned long address, byte data)
{
  EEPROM.begin(4096);
  EEPROM.write(address, data);
  EEPROM.commit();
}

is it right?