-
Definitely from a technical standpoint, round watches are a total pain - you still need to store and transmit a square buffer even for the round screen, so you're wasting 1/4 of your memory and bandwidth.
I can see the appeal of round watches, but I think that for Bangle.js where we're trying to be quite 'down to earth', round isn't a great fit.
And yes, I'd love a bigger display and smaller bezel too, but display choices are pretty limited. For some reason, 1.28" screens seem kind of a standard for transflective displays. There might be some ST7301 based ones coming out at some point, but I haven't seen anything yet
-
Probably the best idea is to use the hardware watchdog - that's what they have them built in for: https://www.espruino.com/Reference#l_E_enableWatchdog
So:
E.enableWatchdog(10, false); setInterval(function() { // your code here E.kickWatchdog(); }, 2000);
If the function doesn't complete to the point that
kickWatchdog
is called, the whole device will restart.But you might also want to look at https://www.espruino.com/Debugger#debugging-when-not-connected - at least then when it stops working you can maybe connect and get some idea what happened?
-
You can upload them using the normal
Storage
button in the middle of the IDE screen and uploading the file from eg https://www.espruino.com/modules/MQTT.min.js to a file calledMQTT
I don't think the IDE is smart enough to know that the modules are actually installed on the device and to not re-upload them, but nothing stops you from renaming it
MyMQTT
on the device, and then doingrequire("MyMQTT");
-
The watch shape really comes down to the display. I think the memory LCD is a good fit for Espruino - it's low power, and low enough pixel count the processor can update it quickly. Having to go for round limits your options a bit - it'll also ensure the vast majority of existing apps won't work... That seems like a bit hit to take just for aesthetics.
For ear buds - I just wonder what features Espruino could add in an ear bud? I guess if it had some voice recognition and synthesis built in, and then with JS you could script what happened - but that's quite a step away from the kind of things Espruino is normally used for!
-
Hi! Yes, I think you could do something... I definitely remember seeing some GSM/etc breakout board that had headphone/mic jacks on it.
Even the phone modules are generally pretty easy to wire up so you could do a custom PCB with a Espruino MDBT42/MDBT50 and phone modules, and an Epaper or LCD slapped on it.
However it's quite a lot of work, and I'm not sure the end result would be much better than a Nokia candybar phone ;)
-
@bobrippling recently posted a really nice way to debug where a variable is written into an issue on GitHub and it struck me we don't have any good sources of tips for debugging issues with Espruino/Bangle.js
I created a Wiki page at https://github.com/espruino/BangleApps/wiki/Debugging-Tips
I've added a few things that come to mind for me when I'm debugging (as well as Bob's trick) - if you're doing any development work you might want to take a look!
If you've got any good tricks you use to debug issues with your code in Espruino yourself, please post them up!
-
I can try something if you like though
Thanks, but I wouldn't worry - it's older firmware so it'd be hard for me to track down here (it could already be fixed if it is an issue). Glad you found a way around it though!
In a way it'd be nice to have a way to easily check how full the output buffer was, but doing setTimeout after as @fanoush suggested is nice and easy :)
-
When the bt signal goes low or near lost, the espruino device reboots
So is it that problem? That sounds a lot more serious than just a delay to me...
I always had issues when code in setInterval run longer than the interval. Since the interpreter is single threaded it won't run the code again if it did not finish but maybe it runs again right after previous one ends not giving chance to any other code or idle loop to run?
It should work ok - it tries to rechedule as soon as possible, but only after processing inputs and running through other intervals I believe. I guess it's possible if the first interval adds a timeout/interval itself it might trigger a re-run which might cause the behaviour you're having?
-
Well, the function at https://github.com/espruino/Espruino/blob/8f3a9cb52/targets/esp32/jswrap_esp32.c#L246 uses
ESP32_Set_NVS_Status(ESP_NETWORK_BLE,enable);
So it seems it uses
nvs_open/nvs_set_u32
withbleStatus
- I don't think it's related to efuse? -
you will see it blinking slower if you make the signal worse.
Oh, ok - well that's expected I think. It's not really a crash.
What's happening is you're writing a bunch of data, but because the signal strength is bad it's not able to send all of that data quickly, so at some point you call
Bluetooth.println
and rather than lose data it waits patiently until enough other data has been sent that it can fit the text in the buffer.Put another way, if you did
Bluetooth.println
with 10,000 characters of data, you'd hope that you would receive all that data - even though it wouldn't fit in the output buffer and theBluetooth.println
function might take a while to complete. It's the same sort of thing.Probably using raw characteristics fixes it for you because if you try and write when too much data is backed up, it just throws an exception and carries on (rather than waiting)
-
-
What happens if you set
Puck.increaseMTU = false
before connection? It's possible that earlier Espruino builds had issues with the increased MTU?The Puck.js lib will try and increase the MTU if it sees that it receives data in chunks of more than 20 bytes (because it assumes that for that to happen the MTU must have increased) and it's possible that it causes problems?
It'd be well worth trying with a newer firmware though, as I know there were some instability issues that have been fixed - 2.14 is quite old now
-
Thanks - the PR looks great!
If you're working with the repository in your PC itself then you can use the
git mv apps/font_Korean apps/fontkorean
command - but I'm not sure what's available on the Github website I'm afraid.Generally I'm not too bothered about having extra commits showing in the repo - but I guess if there are a bunch of single "rename X to Y" commits it's not ideal. I'm not sure if you can do it at your side, but it's just a quick button press when I click merge, so I just did it anyway.
-
Thanks - I guess I'll have to try and find some time to look into it. There must be a way to use the IDF without rewriting the build system just for it - even if it's only to create a CMakeList and then call
idf.py
-
-
-
-
You'll need a nightly build of Gadgetbridge, but with that you can reply - I tested and got it working a few weeks ago. If the message received has
reply:true
set then you can reply to it - you can't do it for all of them. See 'notify' under https://www.espruino.com/Gadgetbridge#messages-from-bangle-js-to-phoneThere are keyboard apps already too - see https://banglejs.com/apps/?q=keyboard and 'read more'... so actually adding the ability to post a reply is only a few lines
-
-
-
Yes, I think you can do it fine on the Pico as you have TLS there? it's literally just MQTT but over TLS
https://www.espruino.com/Reference#tls
Not tried recently, but this should work:
var options = url.parse("localhost:1234"); options.key = atob("MIIJKQ ... OZs08C"); options.cert = atob("MIIFi ... Uf93rN+"); options.ca = atob("MIIFgDCC ... GosQML4sc="); var mqttoptions = { // ALL OPTIONAL - the defaults are below client_id : "random", // the client ID sent to MQTT - it's a good idea to define your own static one based on `getSerial()` keep_alive: 60, // keep alive time in seconds clean_session: true, username: "username", // default is undefined password: "password", // default is undefined protocol_name: "MQTT", // or MQIsdp, etc.. protocol_level: 4, // protocol level }; var mqtt = require("MQTT").create(null, mqttoptions); require("tls").connect(options, function(client) { mqtt.connect(client); } );
certs can now be in storage too.
If this works please can you let me know? It'd be nice to add to the MQTT page
-
-
Thanks - yes, this looks good, but it'd be nice if the filename followed the same style as the other font apps like
fontall
andfontext
- so justfontkorean
and notfont_Korean
? It'd be nice if the README included the same text about how to recreate the font too.Basically the more similar you can make all the apps (same filenames/etc) the easier it'll be to maintain/compare them for other users.
jclock
seems really neat - all I'd say is as you have screenshots there it'd be nice to add them to the metadata so they show up in the app loader and not just the readme: https://github.com/espruino/BangleApps?tab=readme-ov-file#screenshots -
Just a note to say I finally got an ST7301 400x300 LCD working. I don't have a datasheet (do you have one?) but I just used your exact code, changed the window (0x2A/2B) for writing and write 2 bits per pixel, and it works!
Ideally I'd know what I'm setting everything to though as I assume I need to adjust all the voltages to get greyscale on it (which it should do). I can get something that looks a bit different but it's not grey :)