• Looks like I2C.readFrom already returns an Uint8Array, so I think you are doing a double allocation.
    Not sure, but I think your memory usage might be smaller with just:

    var data = read(register, length);
    

    Or not, or might not even be measurable, if that allocation is just in a small function, and the GC frees up memory...

About

Avatar for maze1980 @maze1980 started