Most recent activity
-
-
Wow, that is an odd one. You could try pinMode(BTN1,'pulldown') and see if that helps?
No... Only the simple pinMode statetment seems to help. Odd...
>setInterval(function(){print(digitalRead(BTN1))},1000) =4 0 0 // Multiple BTN1 presses 0 0 0 0 0 0 0 0 0 0 0 0 >pinMode(BTN1,"input_pulldown") =undefined 0 // Multiple BTN1 presses 0 0 0 0 0 0 0 0 0 >pinMode(BTN1) =undefined 0 // 1 BTN1 press 0 1 > ____ _ | __|___ ___ ___ _ _|_|___ ___ | __|_ -| . | _| | | | | . | |____|___| _|_| |___|_|_|_|___| |_| espruino.com 2v10.89 (c) 2021 G.Williams >
Remark the Espruino prompt at the bottom : after a (detected) BTN1 press, I see the Settings/About/... screen, but no responses to BTN1 anymore. Also the setInterval seems to have stopped ??
When you do pinMode do the 0 and 1 correspond to your actual button presses or are they random?
The 0/1 values follow the BTN1 presses
If you're pressing the button for >1 second then you'd expect the Loading screen to appear though as it tries to reload the default app - could that be it?
I don't think so. I've tried to 'quickly' press BTN1. This is below 1 second, I guess
Also when it's not working could you run getPinMode(BTN1) and...
> >getPinMode(BTN1) ="input_pulldown" >
Strange...
I continued my search after I discovered the factory reset function. This should really put everything back to a know state, I suppose. I then installed a simple setWatch :
> >Bangle.factoryReset() Erasing Storage Area... Erase complete. Writing initial storage contents... Write complete. =undefined >setWatch(function(){print("Yes!")},BTN1, {edge:"rising", debounce:50, repeat:true}) =2 > // BTN1 presses, no result > > >pinMode(BTN1) =undefined > // BTN1 presses, no result !!!???
Next I uploaded Espruino's RAM, where I found something strange - to me at least :
//... setInterval(function (undefined) {return WIDGETS["bat"].draw()}, 60000); // 3 // [native code]???? setWatch(function () { [native code] }, D17, { repeat:true, edge:'falling', debounce : 24.99961853027 }); setWatch(function () {print("Yes!")}, D17, { repeat:true, edge:'rising', debounce : 49.99923706054 }); // Code saved with E.setBootCode //...
Is that '[native code]' part supposed to be there ?
-
I have a Bangle.js 2 which no longer wakes up at a BTN1 press. I've completely cleaned the watch ('Remove all Apps' and 'Install default Apps' from https://banglejs.com/apps/) , but to no extent.
When in the Web IDE, I can indeed see that the BTN1 pin stays at zero, whether pressed or not.
>reset() =undefined ____ _ | __|___ ___ ___ _ _|_|___ ___ | __|_ -| . | _| | | | | . | |____|___| _|_| |___|_|_|_|___| |_| espruino.com 2v10.89 (c) 2021 G.Williams // BTN1 released >digitalRead(BTN1) =0 // BTN1 pressed >digitalRead(BTN1) =0 // BTN1 pressed >digitalRead(BTN1) =0
One could assume hardware failure, but the strange thing is that after a 'pinMode(BTN1)' statement, a digitalRead does react as expected.
>setInterval(function(){print(digitalRead(BTN1))},1000) =1 0 0 // Various BTN1 presses following 0 0 0 0 0 0 0 0 0 0 0 >pinMode(BTN1) =undefined 0 0 //BTN 1 detected !!! 1 0 1 1 0 1 0 1 1 > // Here the watch suddenly shows 'loading' and returns to the normal screen with non-functional BTN1
Then after a few seconds, out of the blue, the watch shows 'loading...', the normal screen reappears and BTN1 is again disfunctional (!).
So, I guess one of my previous experiments has 'destroyed' the normal functioning of BTN1 and I cannot restore it back to normal ?The 'settings.json' looks normal to me
{"ble":true,"blerepl":true,"log":false,"timeout":10,"vibrate":true,"beep":"vib","timezone":1,"HID":false,"clock":null,"12hour":false,"brightness":1,"options":{"wakeOnBTN1":true,"wakeOnBTN2":true,"wakeOnBTN3":true,"wakeOnFaceUp":false,"wakeOnTouch":false,"wakeOnTwist":true,"twistThreshold":819.2,"twistMaxY":-800,"twistTimeout":1000}}
Anything I can try ?
-
Hi,
We keep track of serial numbers for anything we deliver to customers. Time has come to do the same for our Bangle.js 2 devices we will be shipping (soon).I've noticed that for 3 devices that we bought with the same order, the serial numbers are very different :
// Connected to Bangle.js 8382 >getSerial() ="c5a488b7-1440c5e7" // Connected to Bangle.js 62e4 >getSerial() ="5bb6f7f0-75a2ae14" // Connected to Bangle.js 5e55 >getSerial() ="5705650f-3ec9f6bf" >
Is there some kind of logic in these serials or are they just 'random' ?
-
For 'Graphics.setFontCustom()', one can specify the font's 'firstChar' for which the documentation states :
firstChar - The first character in the font - usually 32 (space)
I am in the process of including true internationalisation for a Bangle.js 2 app and as such I am designing a custom font (with multiple font pages).
Reading the above doc, I was under the impression one could choose the 'firstChar' value freely and so I started at 0 (zero). Now it seems that character 0x0D (new line) is processed as new line, even if setFontCustom indicated the characters start at 0x00 (and 0x0D is 'just another character')...
I didn't verify if Espruino treats other 'below 0x20' characters in a special way, but it would have saved me a lot of debug time if it had been mentioned in the documentation that 'going below 0x20' is a dangerous adventure...
Just a suggestion to please modify the (excellent) documentation - thanks
No, it was one of the last order. The 2 pre-production models are still going strong - been traveling to 3 trade-shows so far, without problems. Nice !