Submitted by Ewan on
Here is an Arduino library allowing you to write to all flash or EEPROM space with wear leveling. The library already supports multiple memory types (internal EEPROM, I2C and SPI) and can be extended very easily to support others. The memory space can be used as a space to store configuration data with wear leveling, or to read and write (at the same time) sensor data filling the whole memory space efficiently.
The implementation essentially treats any supported RAM, EEPROM, NVRAM, flash or other memory device as a log structured memory space or as a log structured file system with a single file.
As of release 1.0.0 the following memories are supported.
- ATMEGA328P internal EEPROM.
- Atmel AT24C32 I2C EEPROM (supplied with most RTC modules).
- Winbond W25Q64FV 8 MB SPI flash.