-
Got it. I needed to set the watch button, so that I disconnect before in the IDE and then call the method. Now there is another boot screen. I will report if all is fixed.
My code for resetting:
setWatch(() => { E.showMessage("You\npressed\nthe middle\nbutton!"); NRF.disconnect();NRF.restart(function(){ poke32(0x4001e504,2);while(!peek32(0x4001e400)); // enable flash erase poke32(0x4001e514,1);while(!peek32(0x4001e400)); // erase whole uicr poke32(0x4001e504,1);while(!peek32(0x4001e400)); // enable flash writing poke32(0x10001014,0x7A000);while(!peek32(0x4001e400)); // set bootloader address poke32(0x10001018,0x7E000);while(!peek32(0x4001e400)); // set mbr settings poke32(0x1000120c,0xfffffffe);while(!peek32(0x4001e400)); // NFC pins as GPIO poke32(0x4001e504, 0);while(!peek32(0x4001e400)); // disable flash writing }); NRF.restart();}, BTN2);
Update: I just needed to flash a stable version and now it seems to work. I could connect and upload apps via App Loader. Thank you so much.
-
I have used 2v08.117. My code:
NRF.restart(function(){ poke32(0x4001e504,1);while(!peek32(0x4001e400)); // enable flash writing poke32(0x10001014,0x7A000);while(!peek32(0x4001e400)); // set bootloader address poke32(0x10001018,0x7E000);while(!peek32(0x4001e400)); // set mbr settings poke32(0x10001200,21);while(!peek32(0x4001e400)); // enable reset pin 21 poke32(0x10001204,21);while(!peek32(0x4001e400)); // confirm reset pin poke32(0x1000120c,0xfffffffe);while(!peek32(0x4001e400)); // NFC pins as GPIO poke32(0x4001e504, 0);while(!peek32(0x4001e400)); // disable flash writing }); NRF.restart();
The code
peek32(0x10001204).toString(16)
returns 15.
There seems to be a timeout on jshflashwrite which is displayed after a reconnect to IDE.
-
-
-
The exact output of s.send is
=new Uint8Array(6)
It prints "15". So do you have any idea how to fix it? It seems to be possible now to execute code from the Web IDE. I tried to set the storage (settings.json), but afterwards it stucks at boot and does not load the bangle logo. The code for setting the storage:
const storage = require('Storage'); storage.write("setting.json", {ble:true,blerepl:true,log:false,timeout:10,vibrate:true,beep:true,timezone:0,HID:false,clock:null,"12hour":false});
Any idea why it boots after setting storage and does not store it? I send it to RAM.
I think that the settings.json is broken. When I writevar s = require("Storage").readJSON("setting.json",1);
s is undefined.
-
-
@Gordon I already tried to press BTN1+BTN2. As the watch was only used in a dry area without water next to it, I can exclude a water damage. It seems to be a problem with the communication to the external flash memory. Is there a way to check and fix it? I might also have broken the flash by uploaded a program to flash. How could it be restored?
-
Hello, I would like to upload an app using the Bangle.js App Loader. My watch was broken so I had to reinstall a new firmware. Now there is the firmware 2.08 of bangle.js installed (but no settings or clock). This implies that it boots to the Bangle.js logo but nothing more.
When I tried to upload the bootloader, it fails with the error "Upload failed, Unexpected response" display in an orange box.
Do you have any idea what might have caused this error and how I could fix it? I can connect to the bangle.js through the Web-IDE. I also tried to enter
require("Storage").eraseAll();
in the console. It returns undefined.
When I try to execute some code, I get this error:
Uncaught InternalError: Timeout on jshFlashWrite at line 1 col 170 ... 1000);\n}, BTN2);\n",0,116);,
for this sample code:
setWatch(() => { E.showMessage("You\npressed\nthe middle\nbutton!"); setTimeout(()=>g.clear(), 1000); }, BTN2);
-
-
-
-
Do you think that I could solder it also directly to the NRF51822 BLE module instead of the MDBT42Q?
Here is the schematic: https://learn.adafruit.com/assets/17043
Here is the datasheet: https://cdn-shop.adafruit.com/datasheets/MCP73831.pdfThe voltage range would be lower (Wide supply voltage range (1.8V to 3.6V)). Does such a charger have a voltage regulator?
-
Hi,
I would like to power the MDBT42Q through a battery which is connected to a charger. I tried to connect the charger pins (5V & GND) to to pins of the MDBT42Q (GND, V+), which are used if I would connect to battery directly. Unfortunately the board does not react. Is it possible to power the board over the recharger?When I connect it to the Bat and GND pin, it seems to work. Is this the right connection? And where does the other pin stands for?
Here are some illustrations of the connections:
-
Can I simply solder a JST PHR-2 connector to a V+ and GND pin, then connect a LiPo battery (Lithium ion Polymer battery with 3.7V) to the MDBT42Q breakout board for powering from the battery?
And for recharging the battery, simply solder a micro USB breakout board like this to other V+ and GND pins of the MDBT42Q Breakout board (VBUS -> V+, GND -> GND) and then charge it by plugging in a micro usb cable? Or is there an additional board needed for recharging like this which is soldered the same way is described?
-
Hello, I am looking for the smallest device for Espruino. I think that this would be the MDBT42Q Breakout board, right? What is the best way to power the breakout board? It should be as small as possible. Would you recommend a rechargeable battery and how would you connect it? What battery for powering do you recommend?
My goal is an espruino device which is as small as possible and has a quite large battery life time. I know that a large battery lifetime would result in a larger device, so it would also be okay if the battery is quite small, but then it should be rechargeable.
Thanks for your input in advance. If you know other really small devices which support espruino, I would appreciate if you would mention them.
-
-
I would like to create a BLE device which uses Espruino and is powered by a solar panel or cell. It should be as small as possible, not larger than a Puck.js.
Is it possible for a Puck.js or MDBT42Q Breakout Board? What components do you recommend? It should have endless battery lifetime if possible. The board Just advertises and listens for a button, so the power consumption is quite low.
-
-
-
-
Hi, I am interested in adding a new push button (tactile switch) to the Puck.js. My idea:
I would like to add a button. When the user presses this button, a action should be startet (e.g. a message should be send via bluetooth). Unfortunately I am not sure how I can solder it to the Puck.js. The most tactile switches have 4 "legs" to solder (e.g. https://bit.ly/2BTSErG).Do I have to solder the tactile switch directly to the Puck.js or is there a possibility to solder one end of a connector (e.g. an extension cable) to the Puck.js and the other end to the tactile switch? It would be perfect if the position of the switch is not fix.
Where should I solder the switch (or maybe the connector) and which tactile switch do you recommend? Simply to the GPIO pin? And do I need a resistor or something like that to get it work?
And can I really snip of two diagonal pins of the tactile switch?
-
Great idea. It worked now using "AT+CBC\r" for comparison. Thank you. Then you get these values: [bcs, bcl, voltage]
The second one (bcl) returns the battery charge level in percent. So it is exactly what I wanted. By the way bcs shows if the battery is charging. I guess that this is the most elegant way to get the battery level. -
-
Having said all that it looks like the BG96 may itself have a battery level monitor. I think if you send the AT command AT+CBC it'll give you a battery charge value.
@Gordon I have tried to use the command this way:var at = require("AT").connect(Serial3); at.debug(); at.cmd("AT+CBC\r\n", 1000, function(d) { if (d===undefined) ; console.log("DATA"+d); });
Unfortunately it only returns undefined. Should I use another module or what might cause this error?
Hi, I would like to connect to the Bangle.js using the native IDE. I am using the most current version (0.75.8). I can connect to the Bangle watch using bluetooth. But if I try to connect using the IDE, I get the following error: "Unable to retrieve board information. Connection Error?". But the connecting itself works: "Connected to f5:ca:36:76:82:be (No response from board)".
The bangle.js has the current firmware 2.11 and I already tried a hard reset. In the settings, I have set
The baud rate in the IDE is 9600.
Do you have any idea what might cause this connection error and how I might fix it? I also tried the Web IDE, but it does not really connect to my Laptop (it is a HP laptop with Windows 10).
Thanks in advance.