-
I've just done this and you should be able to try it out in the dev app loader at >https://espruino.github.io/BangleApps/?id=bthrmlite
thanks
I imagine there are bugfixes and other stuff that aren't in it though. It works for me, but it >may not function on your heart rate monitor I guess
It worked perfectly with my BLE heart rate sensor, I dunno what would happen having additional sensors close and active. I can investigate further and try to improve a bit
-
The BTHRM widgets should be blue/dark blue for the "BT HR" recorder, green/dark green >for the "HR int" internal recorder and no other colors should be possible. The normal >"HRM" recorder (icon should be red) is enough if you set BTHRM to replace the HRM event.
U 're right, and everything was fine before. I've just realized that the README refers to the "HR recorder" and I was referring to the HRM Widget(widhrt)
Another possibility would be a low memory mode hard coding a lot more of the connection >steps without the custom logic for handling many of the errors and parsing of additional >data like battery and HRV data.
I was wishful thinking about an alternative solution to settings on the watch and its higher use of variables.
I mean adding the possibility of configuring an app from the app loader page, so the users chose parameters and then before upload there is a realtime modification of the app code and
values are hardcoded on the javascript. -
I want to use an external BLE HR sensor with the old bangle.js1 and during the process I am getting following impressions and doubts.
Firstly, I install "Bluetooth Heart Rate Monitor" and the feedback is
- Too high usage of memory for a bangle.js1, it remove almost everything to free enough memory, and even after that sometimes i got the "New interpreter error: CALLBACK,MEMORY"
- Setting: Modes
- I miss a mode ONLY/exclusive for external sensor active or not (I assume that currently this option can be set with custom mode)
- I miss a mode ONLY/exclusive for external sensor active or not (I assume that currently this option can be set with custom mode)
about the README:
For the "Custom" mode, options are not explained and it would be useful, specially for non native english speakersAbout Memory/performance:
It seems that "Bluetooth Heart Rate Monitor" and its setting are using almost the complete bangle.js RAM.
What about the slow SPI flash?
Is it possible to reduce the usage of the limited and precious RAM without changing code?I assume that a change of code that replaces vars by static values would reduce significantly the RAM usage, right?
- Too high usage of memory for a bangle.js1, it remove almost everything to free enough memory, and even after that sometimes i got the "New interpreter error: CALLBACK,MEMORY"
-
(updated)
My below issue was caused by a missing preference inside GB, and specifically a checkbox in the bangle.js connection (Auto reconnect to device)
Time ago my bangle.js1+GB connection were very stable and lasted for many hours.
However at certain moment, GB connection began too fail after short periods, I didn't say anything as i though that a newer version will correct.After a while i decided to check the phone configuration, and then I granted permissions and i added GB to the exclusion list on saving battery. But it is still getting disconnected after after short periods.
-
-
But as I said it doesn't work in the Bangle.js 2 emulator
It has sense that low level code is common and applies also to layout. ;)
On the other hand, I was trying to use at sametime "Layout" (for physical and on screen buttons) and "setUI" (for "back" icon+call, swipe and touch events)
But I've realized that "layout.render()" removes the SetUI settings. Whereas "setUI()" removes the code associated to "layout btns"
am i doing something wrong ?
Is the expected behaviour being exclusive between them? -
The layout library is powerful but it is not a solution to have a long press touch event on (bangle.js2)
Executing below code you can see that "long press" is only detected on Bangle.js1
var v_model=process.env.BOARD; var Layout = require("Layout"); if (v_model=='BANGLEJS'||v_model=='EMSCRIPTEN') v_font="6x8:2"; else v_font="6x8"; var layout = new Layout( { //v vertical type:"v", c: [ {type:"txt", font:v_font, label:".", id:"label", valign:-1, halign:-1 } ] }, {btns:[ {label:"File", cb: l=>print("log: btn1"), cbl: l=>{print("log: long press btn1"); },font:v_font, col:"#f00"}, {label:"Launch", cb: l=>print("log: btn2"),font:v_font, col:"#f00"}, {label:"Color", cb: l=>print("log: btn3"),font:v_font, col:"#f00"} ], lazy:true}); layout.render();
Is it is the expected behaviour?
If yes, is the only alternative digitalPulse?I am aware of @enaon using "longpress" on his eucwatch and I see that it is through digitalPulse?
-
I think the Layout library already does this
Cool and first notice of it. Time ago I tried to create a UI template to implement some of these features
Back to the long press: this could actually really increase robustness
of changing settingsI want to associate the long press to a delete file operation, so a simple event is not an alternative.
-
-
-
I've been trying to get additional interactions compatible with bangle.js1, and i got success long press for buttons.
However I can't find info about how to use Bangle.on('touch' and time periods.
In the documentation there is:Bangle.on('touch', function(zone,e) { ... }); will call the function
with e as an object containing {x,y} every time the screen is tapped
(when unlocked).Besides "zone" and "e"(x,y) there is also "e.type" but i don't know what is its purpose.
Any idea to apply time events for touch tap?
Is the only possible solution at a lower level, such as digitalPulse(pin, value, time)? -
-
-
After some testing I've realize that epoch time from Date.now() and returned from setWatch() are different, and yes it is documented that 2nd one is using float.
I wanted to see in human readable format, and i can do for the result of Date.now(), ie:
console.log("now "+Date.now()); //1677093816456.81469726562 var keyDate = new Date(Date.now()); console.log("converted Date.now",keyDate); //Wed Feb 22 2023 20:23:36 GMT+0100 OK
But I have problems with console.log when using the float from setWatch()
setWatch( function(btnx) { console.log("time "+btnx.time); //1677093816.43038654327 console.log("time *1000 "+btnx.time*1000); //1677093816430.38647460937 var pressDate = new Date(btnx.time*1000); console.log("pressDate "+pressDate); //1677093816430.38647460937 WHY??? } ,BTN1, {repeat:true, edge:'falling'} );
On the other hand, from the IDE console, when i assign the previous float*1000 to a var I can see a human readable value, i.e
var miDate = new Date(1677093816.43038654327*1000); //Feb 22 2023 20:23:36 GMT+0100 OK console.log("miDate "+miDate); // 1677093816430.38647460937 WHY????
I am sure that there is an easy explanation and my issue is causes from the lack of theoretical basics.
-
so, i think textinput works well in bangle.js1 but i just did't know how to use it.
Regarding the incompatible font, and just wishing.... :D
Maybe this type of "common" incompatibilities among devices can be registered/documented, so it would ease to create an script to automate the detection of incompatibilities, potential incompatibilities, potential solutions,...
Then users that develop for its/an specific device and don't use emulators can receive feedback from the script and maybe think about changing the code.
Also it can help to maintenance of the compatibility list (specially useful for new users) so avoid having apps incorrectly marked as compatible; as this one was.
-
I was having the same screen on a banglejs1, but checking from IDE the issue was different :
Uncaught Error: Function "setFont12x20" not found!After setting a different font (vector), I am able to display info in the screen.
On the other hand, the setting alias (textinput) doesn't seem correct or usable on a bangle.js1. Is textinput available for BJS1 too?
-
-
I noticed that some times an app (a clock/watch) executed by the emulator is not the same that I uploaded to storage and tested on a previous time but an older one.
Curiously when i upload a new file to storage during all the session it really seems properly overwritten. For example I can leave the app and execute again from launcher or storage and always it is executing the updated code.
Have you experience it? Ideas besides clearing the cache/storage?
-
-
-
I haven't used the banglejs2, but for more than a year I am using the bangle.js1 as a daily driver.
Yes, before that, it was just a gadget/toy for experiments, but at the moment I found the watch very stable, batt last many days, good apps are continuously improving, and even some of them are useful for my life.
Hardware can't be improved but bjs2 fw/software maybe requires more polish.
I had other smartwatches before from garmin or smartthings with better look and plastics but I prefer the bangle ecosystem.
-
-
You should be able to just press right in the middle of the screen to activate both?
@Gordon Yes, in a real bangle.js touching on the middle area1+area2 is associated to the simulated area 3.
However, in using the simulator the cursor must be touching in a specific point of the screen.
For better simulation of a action with a finger, i think the pointer should have a diameter of ¿2 o3 cms? -
The dual HR (BLE+ANT+) from decathlon also perfectly works fine.
I assume that generic BLE HR sensor should work fine.