@Gordon Brilliant. Thanks so much for that. I have a lot more space now.
I'm struggling with heatshrink though. So what I have so far is.......
var fileName = "log";
var f = require("Storage").open(fileName,"a")
var records = new Uint8Array(32);
var records = [1,2,3,4,5,6,7,8,9];
f.write(require("heatshrink").compress(records));
This creates a file, and I can open it. It's not readable though. I assume that it's a binary file. How do I go about getting this off the device and decompressing it (assume it is correct in the first place). I'd like to do the decompress off the device so I don't have to load the file into memory etc.
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.
@Gordon Brilliant. Thanks so much for that. I have a lot more space now.
I'm struggling with heatshrink though. So what I have so far is.......
var fileName = "log";
var f = require("Storage").open(fileName,"a")
var records = new Uint8Array(32);
var records = [1,2,3,4,5,6,7,8,9];
f.write(require("heatshrink").compress(records));
This creates a file, and I can open it. It's not readable though. I assume that it's a binary file. How do I go about getting this off the device and decompressing it (assume it is correct in the first place). I'd like to do the decompress off the device so I don't have to load the file into memory etc.