-
Ah yes, it is definitely GadgetBridge. I switched GB off, then went to Set Time in Settings. It showed the correct time, long press BTN3 back to clock. Clock displays the correct time. Activate GB again, clock reset to an hour earlier on refresh.
But I don't see any code in the GB widget that would set the time?
EDIT: I think I know whats going on. As I said, I set the Time Zone on the Bangle to +2 to compensate for daylight saving but GB is sending the current time zone, so +1 (even though I disabled the setting for syncing the time in GB).
EDIT 2: But the again GB should send the correct time with TZ +1. I'm confused...
-
-
-
-
Hi,
I tweaked a few settings for my Bangle using Bangle.setOptions, but they don't seem to survive a reboot.For example I changed wakeOnBTN2 and wakeOnBTN3 to false. After E.reboot() they seem to be set to true again. How can I save these settings?
-
Thanks @allObjects, of course I know about the Bangle class and the methods exposed.
I know I can activate and deactivate those sensors manually. I was just wondering: if my app does a Bangel.setGPSPower(1), is GPS then always active even if I leave the app?
That does not seem very power efficient. Hence the question, will GPS be switched off if I return to the clock for example?
I had a look at some apps and I don't see and explicit: "turn off when leaving the app" code.
-
Hi there,
I didn't find anything in the documentation: are the sensors of the Bangle like compass, HRM and GPS switched off if not needed by an app?
E.g. I noticed, that HRM LED turns on when using the HRM app and turns off again if returning to the clock by long pressing BTN3. So who switches of the HRM? Is that being managed by the firmware?
-
-
-
I wish there was some other software I could use on my PC to test the connection to the watch -just to determine whether the problem is with the Bluetooth on my laptop or with Chrome on my laptop.
Maybe you can give this a try: https://www.nordicsemi.com/Software-and-tools/Development-Tools/nRF-Connect-for-desktop
Its the desktop version of the Android app. If that can list the services of the Bangle using your laptop than the laptop BT seems to be fine I guess.
(PS - not a random child on the street, one of my children :-) )
Thanks for the good laugh X-D
-
-
Have you used version 0.35 from Play Store? Bangle.js is only supported starting from 0.4.
See this comment: http://forum.espruino.com/comments/15049677/
You'll need a version > 0.4 from https://gadgetbridge.org/ or F-Droid.
-
Mention of Chrome version, but not OS.
Actually he did in his first post:
(Chrome on Windows 10)
@Paul: I think Opera is not working with WebBluetooth, I have the same problem with Vivaldi (Opera spin-off).
There is even an open feature request by @AkosLukacs in the vivaldi forum: https://forum.vivaldi.net/topic/39459/web-bluetooth-support
I'm having similar issues with an older laptop. Although for me Chrome does not detect my BT dongle that works fine on other PCs.
You could check chrome://bluetooth-internals
However I'm not BT expert and I am not sure if this is helpful at all. The adapter tab in Chrome looks like the screenshot attached for me when scanning for devices via the devices tab.
-
Hi there,
quick googling brought up this: moon phase calculation code in JS on GitHub
Although the calcalution including example here seems easier and smaller to be done in code.
And according to this page time and timezone do not really impact the moon phase because the moon changes ever so slightly during the course of a whole month.
Although you might have to rotate the images depending on your latitude (northern/southern hemisphere).
-
-
if nothing was selected and the cursor was in a global function, the IDE could automatically upload that whole function
would definitively speed things up
Currently I'm using Ctrl + \ but I'm open to more sensible key combinations
On german keyboard layout the \ needs to be used with Alt Gr, so Ctrl+Alt Gr+\
Maybe not a big deal, but could be bothersome. -
@Gordon Do you have any update on the watches? Is the factory still shut down?
-
-
Sorry for the confusion:
So to make it clear:
1) WebIDE on my laptop works in the sense that it can load properly. BUT I can't connect because the built-in bluetooth in my laptop doesn't not support BLE and the BT dongle doesn't work.
2) The WebIDE on my phone using Chrome works; I can connect to the Pixl, but it's not comfortable to work with
3) But: the relay page that used to work before on my phone doesn't work either on my phone and my laptop (just shows this empty page)I had to play with Settings >> Add Device (and remove - (un)pair) many times also.
Strange thing is: the dongle (it's a TP Link UB400) is working fine with my desktop PC. But I just found no way to get it to work on my old HP 8440p yet. I guess this is a problem with USB ports/chipset. The dongle is connected and Chrome shows it in the chrome://bluetooth-internals page and in there also finds the Pixl. But then in the WebIDE popup it finds nothing (doesn't even seem to begin to search)
-> hence, I tried to use the relay that doesn't work :(As @MaBe found out I guess this is a real issue with the page itself
at Object.addIcon (app.js:376)
Maybe this related to the changes that @Gordon made to the WebIDE by adding the storage icon?
-
What is this link for?
As @Robin pointed out with the link, its for relaying the IDE in case you don't have an working BLE adapter, just like my old laptop.
Is this the link you are after?
Well no, I'm trying to connect to my Pixl from my old laptop using my mobile phone with the relay page. I am pretty sure I already successfully tested this a while ago (maybe 2 months or so)
The normal IDE works fine, but can't connect directly because my laptops bluetooth does not support LE and my BLE dongle is for some reason not recognised by Windows/Chrome
EDIT: Btw: I can connect to the Pixl using the Chrome app on my phone with the WebIDE, but of course it's not really efficient to develop on it.
-
Hi there,
is it possible that the relay on the WebIDE is broken?
https://www.espruino.com/ide/relay only shows an "empty" page?
-
Hi @navas,
can you please share us the details ( if possible, with the code) ?
I'd be happy to: https://github.com/ps-igel/EspruinoModules
It's basically a modified version of die SSD1606 paper driver.
I'm sure there is a lot of room for improvement, especially making the data transfer of the buffers to the epapers ram faster.
Wiring as in the example:
Feel free to play around and improve. :)
-
Yes, by a small amount. But, . . . isn't the data bit rate set by the setup of SPI? (yes)
Setting the baud rate, doesn't seem to matter much.
//byte by byte transfer data 1 took: 3.80794239044s @20000000 baud data 2 took: 3.80806064605s @20000000 baud data 1 took: 4.26346969604s @1000 baud data 2 took: 4.26357555389s @1000 baud data 1 took: 4.26337814331s @100 baud data 2 took: 4.26357364654s @100 baud data 1 took: 4.22884178161s @software SPI data 2 took: 4.22821426391s @software SPI //byte by byte without switching CS data 1 took: 3.53529644012s @20000000 baud data 2 took: 3.53545284271s @20000000 baud
There is definitively switching overhead to the CS pin, as mentioned here.
As the image in #16 is helpful here, has the use of an inexpensive logic analyzer been used?
No. Didn't fiddle with that.
What about SPI.send() vs SPI.write() ?
Tested, works, but same speed
-
So, I think I found the culprit. I (again) had a look at the display driver specs and on page 16 it shows the cycle graph(?) for the 4-wire SPI interface, see attached image.
Below the graph it says:
CSB can be “H”between parameter/ command. And SCL, SDA, D/C are invalid
during CSB=”H”That and the rising flank of the CSB signal after the 8 databits on the right, leads me to believe that CS needs to be pulled down and up again for every byte written.
So I changed my write function like so:
function wData(data) { digitalWrite(dcPin, 1); _spi.write(data); } digitalWrite(csPin, 0); for (let i=0;i<bufferSize;i++) wData(buffer[i]); digitalWrite(csPin, 1);
Now this does not work anymore, because CS only changes once right before all the data writing.
Changed it back to:
function wData(data) { digitalWrite(dcPin, 1); digitalWrite(csPin, 0); _spi.write(data); digitalWrite(csPin, 1); } for (let i=0;i<bufferSize;i++) wData(buffer[i]);
immediately starts working.
I assume that
_spi.write(data,csPin);
also pulls down csPin only once.
So now the questions would be: would it be feasible to create a native SPI write function that pulls the cs(nss) pin down for every byte written and does that make sense?
Would my case still benefit speedwise? Otherwise I would be stuck to my single bytes write algorithm and the speed bottleneck it causes.
EDIT: Just stumbled across Espruinos capability of inline C code. I guess that could speed up the data transfer loop...?
If only someone could fix this and build a new version.... 8-)