Permanent Storage

I’m looking for somewhere to store settings over a power cycle when the device is offline. I read this in the documentation:

“A typical use for permanent storage is to cache a device’s settings so that they are retained even if the power should fail or the gadget be restarted for some other reason. The device’s developer might well incorporate a small flash memory chip and write the data there, but the Electric Imp Cloud’s permanent storage facility offers a considerably less expensive alternative – though it requires Internet access, of course.”

Is this still the case with 003? I’m trying to see if there is anywhere else we can store a simple table on the device without adding a flash memory chip to the board.


With '003 you have to add a flash memory chip to the board anyway for the imp’s own purposes, but the imp only needs ~1.5Mbytes, and the chips come in powers of two, so there’s at least 400K or so available to the user even if you fit a 2Mbyte chip, the smallest suitable size: see hardware.spiflash().


Great thanks very much

Wait, I got the numbers all wrong. You need to fit at least a 512Kbyte flash, and the imp uses 448K for its own purposes, so there’s perhaps as little as 64K for the user. But you get the general idea!


As noted in the docs, you can also oversize the SPI flash if you need more than 64K.