-
That's an issue with default parameter values. Online, the actual code uploaded by the IDE is the minified one but that doesn't have the default parameter value.
As a workaround, change the
MPU6050.prototype.setMemoryBank = function(bank, prefetchEnabled=false, userBank=false) {
line toMPU6050.prototype.setMemoryBank = function(bank, prefetchEnabled, userBank) {
-
That change to the code was the answer. The MPU_6050 module is working as local module now, and I can edit it. Thansks @AkosLukacs
I was able to use the online MPU_6050 module in my project, and now I want to use it as a local module, so I can edit it. I set up my sandbox, and followed the process here: http://forum.espruino.com/conversations/286424/
I copied MPU_6050.js to my sandbox\modules folder and names it "MPU_b.js". Then I tried the following project code:
but I'm getting an error:
Is the online MPU_6050.js not formatted correctly to be used as a local module? Do I need to modify it, or change settings so I can load it in my project?