OK - something works. I can somehow create a storage and fill it up with data. What does not work is removing it at runtime.
So how to erase and recreate a Storage file on runtime?
I can storage.eraseAll() but that would remove my code too.
storage.eraseAll()
I can
storage.write('name', [data], 0, large_value)
but that gives me
Uncaught Error: Unable to find or create file
even if I 'overwrite' my current file.
So I'll try to
storage.erase('name'); storage.compact(); // this seems to be necessary to actually free up the space storage.write('name', [data], 0, large_value):
but run into errors too.
Is Storage buggy or am I doing something wrong here?
Storage
@ChristianW started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
OK - something works. I can somehow create a storage and fill it up with data.
What does not work is removing it at runtime.
So how to erase and recreate a Storage file on runtime?
I can
storage.eraseAll()
but that would remove my code too.I can
but that gives me
even if I 'overwrite' my current file.
So I'll try to
but run into errors too.
Is
Storage
buggy or am I doing something wrong here?