Ahh - yes, so you can remove libraries and then adjust the PIXLJS.py file to increase the available flash storage, but generally we try pretty hard to ensure that libraries don't use RAM so it won't actually free up any more variables.
I've just taken a look at that module and there's a load of room for improvement (for instance it stores the data in RAM even though it's only used on initialisation).
So, I made some changes. I don't have one here to test with so haven't made it live yet, but please could you try:
// replace
require("MPU6050_DMP")
// with
require("https://raw.githubusercontent.com/espruino/EspruinoDocs/master/devices/MPU6050_DMP.js")
Then ensure that module minification is on (the default) and that you're saving to flash.
The minified file is down from 11k to 7k and RAM usage should be down massively. If that works I'll make the modified file live on the website.
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.
Ahh - yes, so you can remove libraries and then adjust the
PIXLJS.py
file to increase the available flash storage, but generally we try pretty hard to ensure that libraries don't use RAM so it won't actually free up any more variables.I've just taken a look at that module and there's a load of room for improvement (for instance it stores the data in RAM even though it's only used on initialisation).
So, I made some changes. I don't have one here to test with so haven't made it live yet, but please could you try:
Then ensure that module minification is on (the default) and that you're saving to flash.
The minified file is down from 11k to 7k and RAM usage should be down massively. If that works I'll make the modified file live on the website.