I'm trying to use basic widget example from Bangle.js Widgets.
Using it in IDE with this works:
WIDGETS = {}; (() => { function draw() { g.reset(); g.drawString("X", this.x, this.y); } WIDGETS["mywidget"] = { area: "tl", width: 28, draw: draw }; })() Bangle.drawWidgets();
But when I remove first/last lines and upload resulting code to Bangle.js 2 using my local copy of https://banglejs.com/apps the widget is not loaded.
How can I debug why it is not loaded?
@malaire started
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.
I'm trying to use basic widget example from Bangle.js Widgets.
Using it in IDE with this works:
But when I remove first/last lines and upload resulting code to Bangle.js 2 using my local copy of https://banglejs.com/apps the widget is not loaded.
How can I debug why it is not loaded?