My idea was to define a file in storage and use it free like this:
var st = require("Storage");
var fn = "b";
st.write(fn,'X',0,20);
print(st.read(fn));
st.write(fn,[64,65,66],0);
print(st.read(fn));
This only works fine, if 2nd write does not use 0 for offset.
Otherwise, size is reduced to data written. In this case 3, and not 20 as defined in first write.
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.
My idea was to define a file in storage and use it free like this:
This only works fine, if 2nd write does not use 0 for offset.
Otherwise, size is reduced to data written. In this case 3, and not 20 as defined in first write.