-
-
What is correct sizing for the Bangle js 2 strap? It's okayish but chaffs a bit after few hours.
I could not find this info on https://github.com/espruino/BangleApps/wiki . Any recommendations?
-
I built Tides app which gets JSON data from tidesandcurrents.noaa.gov in custom.html (like openstmap does).
When I test it from github.io I get CORS policy error.
Is that something I have to work around or it would work fine on https://banglejs.com/ ?
Access to XMLHttpRequest at 'https://tidesandcurrents.noaa.gov/api/datagetter?product=predictions&application=NOS.COOPS.TAC.WL&range=720&datum=MLLW&station=8531680&time_zone=lst_ldt&units=english&interval=hilo&format=json' from origin 'https://pasniak.github.io' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
-
For reference: 2v10.219
I followed to upload my new app:
App Code: timer.app.js⇠
We'll use timer. Now, click the down-arrow below the Upload button, then choose Storage, then New File, and then type timer.app.js and click Ok.I am getting: "You have pre-1v96 firmware - unable to upload to Storage" messages. (I updated the Bootloader)
I can save file to my Linux filesystem and upload to Bangle.js 2 watch but I cannot upload this directly from Espruino Web IDE as per instructions.
-
-
I have idea of a project: I would like to measure elevation change in air... with good precision <=.5m.
Espruino supports MS5803 which seems ok sensor compared but I understand it has only.2 mbar so ~1.5m air max precision. Is that right? Bosh's sensors BMP3xx seem to be doing better.... .5m (the newest 2020 chip is even more precise but I see no breakouts available). Should I hack C for this and add Js API code for BMP3xx?
The another problem is need to proof the puck for wet env (not underwater but strong splash). Silicon on top is great but how to seal the whole? I could ziplock (plastic bag it) but that is a bit lame. Any ideas?
Which form factor? Does the orange breakout off ebay like this https://github.com/sparkfun/SparkFun_MS5803-14BA_Breakout_Arduino_Library fit?
What precision could I expect? could I do 5-10Hz? Are there any problems with float calcs? https://lukemiller.org/index.php/2014/04/arduino-code-for-ms5803-pressure-sensors/
-
I want to display consistent:
- current time in currently configured TZ and
- current time UTC (or any other TZ)
on current vertical clock (instead Steps which is not working anyway).
The below works in emu (to show current tz and UTC) but only for the short time using E approach (but what if to new Date() calls span the minute...i.e one is in prev minute, other is in the next?).
For the second approach the added value would be 0 for UTC but it does not work....
require("Font8x12").add(Graphics); let HRMstate = false; let currentHRM = "CALC"; function drawTimeDate() { var d = new Date(); var h = d.getHours(), m = d.getMinutes(), day = d.getDate(), month = d.getMonth(), weekDay = d.getDay(); var daysOfWeek = ["SUN", "MON", "TUE","WED","THU","FRI","SAT"]; var hours = (" "+h).substr(-2); var mins= ("0"+m).substr(-2); var date = `${daysOfWeek[weekDay]}|${day}|${("0"+(month+1)).substr(-2)}`; // Reset the state of the graphics library g.reset(); // Set color g.setColor('#2ecc71'); // draw the current time (4x size 7 segment) g.setFont("8x12",9); g.setFontAlign(-1,0); // align right bottom g.drawString(hours, 25, 65, true /*clear background*/); g.drawString(mins, 25, 155, true /*clear background*/); // draw the date (2x size 7 segment) g.setFont("6x8",2); g.setFontAlign(-1,0); // align right bottom g.drawString(date, 20, 215, true /*clear background*/); drawOtherTimezone(d, 0); } //We will create custom "Widgets" for our face. function drawOtherTimezone(d, tzOffset) { //Reset to defaults. g.reset(); // calculate the other tz date var currentTz = d.getTimezoneOffset(); // -6 for me now in emu E.setTimeZone(tzOffset); var d2 = new Date(); E.setTimeZone(currentTz); // return to default /* var d2 = new Date(d2+tzOffset*3600000); */ var h = d2.getHours(), m = d2.getMinutes(), day = d2.getDate(), month = d2.getMonth(), weekDay = d2.getDay(); var hoursMins = (" "+h).substr(-2)+":"+("0"+m).substr(-2); // draw the other tz date g.setColor('#7f8c8d'); g.setFont("8x12",2); g.setFontAlign(-1,0); // align right bottom g.drawString("UTC+"+tzOffset, 145, 40, true /*clear background*/); g.setColor('#bdc3c7'); g.drawString(hoursMins, 145, 65, true /*clear background*/); } function drawBPM(on) { //Reset to defaults. g.reset(); g.setColor('#7f8c8d'); g.setFont("8x12",2); g.setFontAlign(-1,0); var heartRate = 0; if(on){ g.drawString("BPM", 145, 105, true); g.setColor('#e74c3c'); g.drawString("*", 190, 105, false); g.setColor('#bdc3c7'); //Showing current heartrate reading. heartRate = currentHRM.toString() + " "; return g.drawString(heartRate, 145, 130, true /*clear background*/); } else { g.drawString("BPM ", 145, 105, true /*clear background*/); g.setColor('#bdc3c7'); return g.drawString("- ", 145, 130, true); //Padding } } function drawBattery() { let charge = E.getBattery(); //Reset to defaults. g.reset(); // draw the date (2x size 7 segment) g.setColor('#7f8c8d'); g.setFont("8x12",2); g.setFontAlign(-1,0); // align right bottom g.drawString("CHARGE", 145, 170, true /*clear background*/); g.setColor('#bdc3c7'); g.drawString(`${charge}%`, 145, 195, true /*clear background*/); } // Clear the screen once, at startup g.clear(); // draw immediately at first drawTimeDate(); drawBPM(); drawBattery(); var secondInterval = setInterval(()=>{ drawTimeDate(); }, 15000); // Stop updates when LCD is off, restart when on Bangle.on('lcdPower',on=>{ if (on) { secondInterval = setInterval(()=>{ drawTimeDate(); }, 15000); //Screen on drawBPM(HRMstate); drawTimeDate(); drawBattery(); } else { //Screen off clearInterval(secondInterval); } }); // Show launcher when middle button pressed setWatch(Bangle.showLauncher, BTN2, { repeat: false, edge: "falling" }); Bangle.on('touch', function(button) { if(button == 1 || button == 2){ Bangle.showLauncher(); } }); //HRM Controller. setWatch(function(){ if(!HRMstate){ console.log("Toggled HRM"); //Turn on. Bangle.buzz(); Bangle.setHRMPower(1); currentHRM = "CALC"; HRMstate = true; } else if(HRMstate){ console.log("Toggled HRM"); //Turn off. Bangle.buzz(); Bangle.setHRMPower(0); HRMstate = false; currentHRM = []; } drawBPM(HRMstate); }, BTN1, { repeat: true, edge: "falling" }); Bangle.on('HRM', function(hrm) { if(hrm.confidence > 90){ /*Do more research to determine effect algorithm for heartrate average.*/ console.log(hrm.bpm); currentHRM = hrm.bpm; drawBPM(HRMstate); } }); //Bangle.on('step', function(up) { // console.log("Step"); //});
- current time in currently configured TZ and
-
Hmm, in emulator I get
>Uncaught Error: Function "getTimezoneOffset" not found! at line 41 col 21 var tz = Date.getTimezoneOffset(); ^
Another problem I run into changing timezone in E and resetting is to pull another Date is I have to pull Date 2 times and the minutes could be off (59 in one, 00 in other)....
-
This lib looks quite sane https://momentjs.com/timezone/ (MIT license). Is there a way to include something like that?
// hypothetical conversion for display of current time in different timezone var now = moment(Date().toISOString()) now.tz('America/Los_Angeles').format('ha z'); // 5am PDT
For me js is still mystery so no idea where .format() in the above comes from...
-
-
Hello!
TLDR: Is Flag Raiser app supposed to work with the Puck v2?I got Web BT working with my Puck.js v2 (i.e send LED on/off code when clicking on buttons in Chromium).
I would like to do the same from Bangle.js so I picked Flag Raiser app to modify it (it was doing nothing to the puck).
I looked at Web BT puck.js library and it seems to have different service GUIDS
var NORDIC_SERVICE = "6e400001-b5a3-f393-e0a9-e50e24dcca9e";
var NORDIC_TX = "6e400002-b5a3-f393-e0a9-e50e24dcca9e";
var NORDIC_RX = "6e400003-b5a3-f393-e0a9-e50e24dcca9e";
but when I change Flag Raiser code and use the new address thenUncaught Error: Function "" not found! at line 17 col 611 ...Done!");busy=false;redraw();}).catch(function(e){console.log("ERROR",e);bus... ^ in function called from system Uncaught Error: Unhandled promise rejection: No device found matching filters >
What does that mean? Tips? Suggestions?
M -
On a whim, I wanted to try new Animated Clock face... the unusual long upload time got me into boot always stuck at >Bluetooth.
I followed troubleshooting proc ("Install default apps") which got me to the good starting point. Then, I chose my apps and run "Install favourite apps". This got me to No clock found (fixed by installing Morphing Clock.
-
When you move around, you get wildly different signals from the diodes
why?
I tried HRM in total darkness; it feels like lateral movement causes swings - so are you saying area absorbing blood changes due to movement?Could time series of of HRM measurement be smoothed (with exponential moving average for example) ?
-
-
Display's not a dealbreaker, given hackability!
I see teh flashed Launcher is 0.01 - I am trying to update... unlike puck.js which always appears in Chromium BT devices list, the watch's BT seems more finicky.
I believe I got the right "Weather notification" app 0.3.10, which does keeps a notification in statusbar of the phone.
I've just got Gadgetbridge Debug to show a Test message (the font is terribly small!!!) on bangle.js (and watch display shows on disconnect) so it must be something on GB/Android/Weather end... I refresh Weather, the phone notification ("Build-in skin") changes but no text on the watch.
-
Got bangle.js week ago. Overall good experience for wearability.
Remarks (firmware v2.05):
+++ near week of power! nice!- display easy to read
- app lists slow to scroll (with a long list of apps). Maybe add a wraparound?
- display too dim in direct sunlight (needs shade to read)
- heart monitor - need to stop running to get any reading
- could not get Gadgetbridge (off F-Droid) to "Find lost device" or show messages from "Weather notification" (blue circle + bluetooth sign are on)
M
- display easy to read
-
-
-
I had to dig out my old Android tablet (the only one with Google Play so I could install DFU), download 2v14 firmware and that worked. So painful.
I upgraded to 2v14 because because messages from GadgetBridge were not visible (no text, no x buttons) on the banglejs2 watch.