-
-
Thanks Gordon. Possibly related, as it uses the screen heavily - Jhey's Hypno Rings app now causes a hard crash of the watch when launched even tho he hasn't changed the code since NCEU. Have to reboot watch after launching. I think it gets as far as displaying one pixel. Tried it as copy/paste in REPL and it causes the same crash with no errors shown. Also crashes emulator and causes Chrome tab to hang.
-
-
-
-
Welcome back and congratulations to you both Gordon!! I hope everyone is thriving.
Not a hugely important one but it's hitting everyone we've given a Bangle.js to:
The Flappy Bird app.js code runs fine on a Bangle.js if you paste it into the Web IDE and run from RAM (or use the emulator) but when I install it as an app from the App Loader (or create an offline version of it), it hangs on "Loading..." if I try to launch it.
Commenting out
Bangle.setLCDMode("120x120");
strangely worked but obviously resulted in a trashed display. No errors being shown anywhere so not sure where to look further.
I did see
Execution Interrupted New interpreter error: LOW_MEMORY,MEMORY
once in the Web IDE after pasting Bangle.setLCDMode("120x120"); directly but that may just be a coincidence.
I also changed the code not to use onInit(); in case that was causing some issue but that was a red herring.
Is there some behaviour difference between that code running from RAM and running from Flash?
I've tried multiple firmware versions including today's nightly but no joy.
-
-
Awesome work Damien! Related to the GPX traces, we also did some initial playing with grabbing map tiles from Mapbox after we realised that OSM doesn't like people using their internal APIs for tiles.
The Mapbox API works really well and is very simple to use. It's also free for quite a bit of usage. I'll shoot you over the info I have. We didn't have time to finish it for NodeConf EU.
-
Thanks Gordon. I'll do more poking around.
There is something odd tho in UUID handling at the moment. The latest stable Pixl.js firmware running same code gives an error for full UUIDs saying they must only contain hex characters and dashes, when I'm using things like "8d96b002-0002-64c2-0001-9acc4838521c". Only stops giving error if I use short 0xNNNN UUIDs with no quotes.
Bangle.js not giving that error for the same code.
-
-
Thanks Gordon. Just tried latest Pixl.js build. The BLE error ended up being user error. If I don't use the full UUID for the characteristic then it should be 0x2A37 not "0x2A37".
So errors now gone but still no change notifications.
Note that a non-changing value can be read fine e.g. Body Sensor Position gives 1 (Chest) correctly with this:
return s.getCharacteristic(0x2a38);
Just looking at NRF Connect logs, it does gatt.setCharacteristicNotification(). Is that done under the hood in c.on('characteristicvaluechanged' ?
D 12:33:18.447 gatt.setCharacteristicNotification(00002a37-0000-1000-8000-00805f9b34fb, true) D 12:33:18.448 gatt.writeDescriptor(00002902-0000-1000-8000-00805f9b34fb, value=0x0100) I 12:33:18.514 Data written to descr. 00002902-0000-1000-8000-00805f9b34fb, value: (0x) 01-00 A 12:33:18.514 "Notifications enabled" sent V 12:33:18.519 Notifications enabled for 00002a37-0000-1000-8000-00805f9b34fb I 12:33:19.314 Connection parameters updated (interval: 1012.5ms, latency: 0, timeout: 10120ms) I 12:33:21.340 Notification received from 00002a37-0000-1000-8000-00805f9b34fb, value: (0x) 00-47 A 12:33:21.340 "Heart Rate Measurement: 71 bpm,
I found some info that says HRMs specifically need to be told to send updates, so I added:
return device.getPrimaryService(0x1801); }).then(function (s) { Terminal.println("Service ", s); return s.getCharacteristic(0x2a05); }).then(function (c) { return c.writeValue(0x0100);
But still no joy.
-
I'm trying to read pulse data from a cheap Aldi/Lidl Bluetooth chest HRM strap (brand Medisana).
NRF Connect can see the data fine and shows continuous value updates when connected. But I'm having no joy using some of the sample code floating around the forums and API reference on either a Pixl.js (latest 2v04 stable) or Bangle.js. The code I'm using is as follows:
var device; NRF.connect("54:4a:16:52:04:30 public").then(function(d) { device = d; return d.getPrimaryService("0x180D"); }).then(function(s) { Terminal.println("Service ",s); return s.getCharacteristic("0x2A37"); }).then(function(c) { c.on('characteristicvaluechanged', function(event) { Terminal.println("-> "+event.target.value); }); return c.startNotifications(); }).then(function(d) { Terminal.println("Waiting for notifications"); }).catch(function(e) { Terminal.println("Something's broken: ", e); });
It connects fine and gets through the primary service and characteristic but it never shows any update notifications.
It also gives the
Uncaught InternalError: BLE task completed that wasn't scheduled (3/4)
error after a few seconds.
The Service info is:
Service BluetoothRemoteGATTService: { "uuid": "0x180d", "isPrimary": true, "start_handle": 16, "end_handle": 23 }
and the Characteristic info is:
BluetoothRemoteGATTCharacteristic: { "uuid": "0x2a37", "handle_value": 18, "handle_decl": 17, "properties": { "broadcast": false, "read": false, "writeWithoutResponse": false, "write": false, "notify": true, "indicate": false, "authenticatedSignedWrites": false } }
Any suggestions for things to try?
-
@cottjr I believe some updates from later in 2018 have sorted it out. But once I switched it to running it as a service, I stopped checking, as systemd will automatically restart it after a crash.
-
-
-
-
I had Espruino running on that device a few months back using the micro:bit image.
It gave errors about I2C in the console but otherwise worked fine. Tiny memory tho, so a lot of examples don't work.
I programmed it with this cheapo SWD dongle: https://www.ebay.ie/itm/Brand-New-J-Link-OB-ARM-Debugger-Programmer-Downloader-replace-V8-SWD-M74-MO/152480021834?hash=item2380847d4a:g:neoAAOSwOgdY0L8m
-
About twice as fast in software. Bummer about the hardware speed.
var spi = new SPI(); spi.setup({sck:D18, mosi:D23, baud: 4000000}); var g = require("ILI9341").connect(spi, D26, D27, D5, function() { g.clear(); g.drawString("Hello",0,0); g.setFontVector(20); g.setColor(0,0.5,1); g.drawString("Espruino",0,10); });
-
-
I'm playing around with one of the TTGO boards. It has an ILI9341 screen. But it looks like SPI is running at an extremely low rate. It takes several seconds just to clear the screen.
SPI1.setup({sck:D18, miso:D12, mosi:D23, baud: 1000000}); var g = require("ILI9341").connect(SPI1, D26, D27, D5, function() { g.clear(); g.drawString("Hello",0,0); g.setFontVector(20); g.setColor(0,0.5,1); g.drawString("Espruino",0,10); });
I found an old thread that mentioned ESP32 defaulting to 100kbs and ignoring the baud setting. Is that still true? Any way around it? Thanks.
-
-
Thanks @MaBe. That worked. But I've no idea where that GMT-6000 came from.
-
I have the usual "set current time" toggle enabled in the WebIDE. But Date on the Pixl is giving me this weird :
Fri May 25 2018 07:35:09 GMT-6000
when it's actually Sunday at 20:35 BST
I did
setTime(Date.parse("2018-05-27T20:35:10") / 1000);
so the time is now right. But it's still printing out GMT-6000.
Am I missing something blindingly obvious?
(Windows 10 standalone Web IDE from last week. Pixl on both 1v97 and 1v99).
-
Thanks Gordon. I wasn't able to get headless working on the original install. Everything appeared to be ok but it never detected devices. Worked fine with start.sh. I assume I'm missing a permission or something somewhere. Will try again, particularly for the auto-restart!
Interesting re malformed data. There are quite a few BLE devices in the room, several of which, like the Milestone Pod, sleep until they are moved. So it may be one of them.
I'll sort out step one and report back.
Thanks Gordon! Mostly using stock morphing clock but had big clock on one device. I'll test latest build today.