You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • Yes, that's right. There's 512k on the chip, but with the Bluetooth stack, bootloader, and then Espruino there's only 40k left.

    Potentially it would be possible to do a different build of the Puck.js firmware that stripped out features that you're not using (graphics, crypto, networking) and then freed that up as space to allow you to save data.

    How much space do you need?

    It's worth saying that:

    • If you store data as binary you'll be able to pack data in a lot more densely
    • You can also compress with require("heatshrink").compress

    What I'd suggest is you store the data in a Uint8Array/DataView in RAM until you get to a certain size (lets say 5k), then you just write it to Storage with require("Storage").write("data1", require("heatshrink").compress(data))

    That should get you a pretty decent amount of data stored

About

Avatar for Gordon @Gordon started