• Hi there,

    I'm looking to store some data files on my pixljs (it's got 512 KB total flash - yay). However when I was doing some testing I found that the available flash storage is quite a bit lower. I ran the following code:

    //cleanup existing flash storage
    storage = require("Storage");
    storage.list().forEach(function(fname){ 
      console.log(fname); 
      storage.erase(fname);
    });
    
    // fill er up
    var i;
    var packages_written = 0;
    for (i = 0; i < 512; i++) {
      data = new Uint8Array(1000);
      storage.write(i.toString(), data);
      console.log("wrote: " + i);
    }
    

    This ended up writing 33 files (so ~33KB of storage). I'm looking to store about 360KB of binary data files (though that seems to be doubtful at the moment).

    Anyone have pointers on optimizations I can do to increase the flash storage? I rather liked not having to use an SD card and holding everything on the device. Additionally is there an easy way to identify when the local flash storage is full (I was looking through the API and didn't see any good methods of doing that).

    Thanks in advance

About

Avatar for cozezien @cozezien started