-
Thanks.
Still trying to understand why this gives unknown font on my codeModules.addCached("Font7x11Numeric7Seg",function(){exports.add=function(a){a.prototype.setFont7x11Numeric7Seg=function(){this.setFontCustom(atob("AAAAAAAAAAAAAAEAAAAQAgBACAAAAHvQBgDAGAL3gAAAAAAAAAAHvAAA9CGEMIYQvAAAACEMIYQwhe8AB4AIAQAgBA94ADwIQwhhDCEDwAHvQhhDCGEIHgAAAgBACAEAHvAAe9CGEMIYQveAA8CEMIYQwhe8AAABjDGAAAA96EEIIQQge8AB7wIQQghBCB4AD3oAwBgDAEAAAAPAhBCCEEL3gAPehDCGEMIQAAAe9CCEEIIQAAAAAAAA"),32,atob("BwAAAAAAAAAAAAAAAAcCAAcHBwcHBwcHBwcFAAAAAAAABwcHBwcH"),11)}}}); // Load fonts require("Font7x11Numeric7Seg").add(Graphics); Bangle.setLCDTimeout(40); function myFunction(txt) { g.reset(); g.setFont("Font7x11Numeric7Seg",4); g.setFontAlign(0,0); g.drawString(txt, 130, 120, true); } g.clear(); myFunction("12:20");
-
-
-
-
-
-
-
-
-
-
Do you know if there's an app in the app loader that sends text from a web to the banglejs, so I can see the code example?
I solved everything and all I got left is to enlarge the font of the showmessage command. So I either change the way the info is sent to the watch... or I patch the firmware. Old hacky style
-
-
I was able to receive words from button press, but I'm a bit confused as of why it works only one time for each button press. This is all the code in my banglejs app:
setWatch(() => {
E.showMessage("sent");
Bluetooth.println("sent");
setTimeout(()=>g.clear(), 5000);
}, BTN3);setWatch(() => {
E.showMessage("hear");
Bluetooth.println("hear");
setTimeout(()=>g.clear(), 5000);
}, BTN1);I lost the ability to send from the website to the watch now, as pressing the button that calls the function Puck.write('E.showMessage("HELLO","Message")'); instead of making the watch show it as before, it asks for a new ble connection.
-
-
-
Amazing, thanks! I have expertise on JS and Ajax but not on promises, however I'm good at "understanding" or may I call reverse engineering given a working script.
Looking at the Espruino reference I already suspected the 'function' command was the one to use, but I needed some advice.
In fact button detection is not really needed, only the ability to send a text to the website. The button press will happen at the watch and the js at the web can interpret it. I thought " Bluetooth.println(JSON.stringify({t:"info", msg:"Hello"})); " might work, but no.
I am testing at my own server as you pointed out. I appreciate the help.
-
-
-
-
-
-
-
Can't see the mistake but solved by copying from draw() function.
How to add a new clock to the "settings/select clock" menu?