Go Down

Topic: arduino databse eeprom lib (Read 3 times) previous topic - next topic

yair


PaulS

Quote
all dedicated solutions i found are broken on 1.0

So? Fix one of them.

You really don't have a lot of room for a database on an Arduino. 2K doesn't hold a lot of data.

yair

ok, attached zip of extendeDb lib compiles under 1.0.1


robtillaart

Thanks for sharing,

added a link on - http://arduino.cc/playground/Code/ExtendedDatabaseLibrary - to this thread so people see your updated lib
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

yair

thanks robtillaar, to make compatible i replaced WProgram.h with

Code: [Select]
#if defined(ARDUINO) && ARDUINO >= 100
  #include "Arduino.h"
#else
  #include "WProgram.h"


actually i dont real like that lib, made me want to get closer to the metal.
anyways i did some benchmark using EEPROMEx lib, and was a bit shocked to find out the write speeds of EEPROM

Code: [Select]
Check how much time until EEPROM ready to be accessed
-----------------------------------------------------
Time to write 1 byte  (ms)                        : 0
Recovery time after writing byte (ms)             : 4
Time to write Long (4 bytes) (ms)                 : 10
Recovery time after writing long (ms)             : 4
Time to read Long (4 bytes) (ms)                  : 0
Recovery time after reading long (ms)             : 0
Time to write 7 byte array  (ms)                  : 20
Time to update 7 byte array with 7 new values (ms): 18
Time to update 7 byte array with 3 new values (ms): 10
Time to read 7 byte array (ms)                    : 0


so i've been thinking about moving over to PROGMEM land (using this FLASH lib).

my db is about 510 bytes.
is flash memory a better path?
not just for speed. any cons?

Go Up