You are reading a single comment by @msdeibel and its replies. Click here to read the full conversation.
  • Hello everyone,

    I just started working on a data recorder widget/app for the Bangle and want to limit the file size to keep a maximum of one week worth of data. Which amounts to around 1000 lines in a text file (1 line/10 min).

    Now that the storage size is limited and flash mem has a limited number of write cycles I was wondering what would be the best way to handle this.

    In a simple solution I would

    open the data file
    read all lines into an array
    append the new line to the array
    write all lines, but the first, into the file

    Since I'm quite new to developing for the Espruino I don't want to mess up the flash within a few days of the widget repeatedly writing to the flash.

    Do you have any suggestions how the proposed solution could be improved?


Avatar for msdeibel @msdeibel started