I've made it simpler. I run Apache. Configured it for CORS. Copied modules into /var/www/html/mark/BangleApps/modules/
Added this to IDE Modules path http://localhost/mark/BangleApps/modules/
Now IDE accepts require, but still saying AT6558 not defined.
>require("AT6558");
=function (a) { ... }
>gnss = new AT6558("TST");
Uncaught ReferenceError: "AT6558" is not defined
at line 1 col 12
gnss = new AT6558("TST");
To fix the above issue I've added to my module.
exports.connect = function(id) {
return new AT6558(id);
};
and use it from program following way
gnss = require("AT6558").connect("TST");
Adding to this, it required also to set default expiration to 0 in apache settings. Otherwise Web IDE keeps using old file from browser cache despite it was already modified.
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.
Yes, I've done everything what was in the manual.
I've made it simpler. I run Apache. Configured it for CORS. Copied modules into /var/www/html/mark/BangleApps/modules/
Added this to IDE Modules path http://localhost/mark/BangleApps/modules/
Now IDE accepts require, but still saying AT6558 not defined.
To fix the above issue I've added to my module.
and use it from program following way
Adding to this, it required also to set default expiration to 0 in apache settings. Otherwise Web IDE keeps using old file from browser cache despite it was already modified.