MPU6050.js as local module #1040
Replies: 4 comments
-
Posted at 2019-12-20 by AkosLukacs 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 |
Beta Was this translation helpful? Give feedback.
-
Posted at 2019-12-20 by @allObjects ...that's quite bad implementation in the original module... What do I miss here? Is the minified version not the minification of the non minified version? ...may be the minification does something Espruino (lesser ES version cannot do and it is 'shimmed' in the minification process...) has not implementd. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2019-12-20 by Robin Fri 2019.12.20 Could the missing semicolon L2 be causing a parse issue with the module? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2019-12-21 by barrier 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 |
Beta Was this translation helpful? Give feedback.
-
Posted at 2019-12-20 by barrier
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/](Creating and Using a Local Module with WebIDE)
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?
Beta Was this translation helpful? Give feedback.
All reactions