Most recent activity
-
-
I feel like I'm missing something obvious - but I've tried to hunt around first.
How do I persist an app/code I've written myself to the bangle?
When I upload from the IDE, returning to the menu on the watch loses the state that's been updated and I lose my software.
Whereas apps I've uploaded via the banglejs.com/app "store" do persist. I gather I'm missing something (obvious?).
Thanks in advance.
– Remy
-
- 24 comments
- 7,945 views
-
Yeah, putting the
setAdvertising
in the update did seem to do the trick.Still a bit weird that the name isn't set, though I can see it on the nRF Connect app if I explicitly read the value, but my browser (via webBT) is still reading the old "Pluck 1234" value. Not a biggie though.
Now seeing if I can add some more services to this poor little puck!
-
-
Quick update, I've got the
heart_rate
service advertising and "working". Note that I lifted thesetAdvertising
values from here and just copied theGAPSETADVDATA
value into a hex array, but I really don't understand why it works.var hr = 65; function update() { hr++; if (hr > 120) { hr = 65; } NRF.updateServices({ 0x180D: { // heart_rate 0x2A37: { // heart_rate_measurement notify: true, value : [0x06, hr], } } }); setTimeout(update, 1000); } NRF.setServices({ 0x180D: { // heart_rate 0x2A37: { // heart_rate_measurement notify: true, value : [0x06, hr], }, 0x2A38: { readable: true, value: [0x02] } } }); NRF.setAdvertising([ 0x02, 0x01, 0x06, 0x05, 0x02, 0x0d, 0x18, 0x0a, 0x18 ], { name: "puck heart", // this doesn't stick at all, no idea why showName: true, discoverable: true, interval: 600 }); // if I update too early, it seems like GATT is still trying to do the previous updates setTimeout(update, 2000);
-
0x06
in the heart_rate_measurement is the flags and says that it's got contact.0x40
is the heart rate0x02
is the sensor location value
As per subject, I've got a puck (I think from the kickstarter campaign way back), and when I half insert the (new) battery, it powers up fine and probing the 3V and GND test points gives me 3.00v off the battery.
But once I fully push the battery in, the voltage is around 0.2-0.4v - which explains why I couldn't connect to the Puck anymore.
It's visibly clean inside the Puck and barely used. The cell battery is clean too.
Is this a known (ideally fixable) issue?
Any ideas or advice would be much appreciated.
Thanks in advance.