-
and the code
NRF.on('connect', function(addr) { digitalWrite(LED3,1); setTimeout(function () { digitalWrite(LED3,0); }, 750); }); NRF.on('disconnect', function(addr) { digitalWrite(LED1,1); setTimeout(function () { digitalWrite(LED1,0); }, 750); } ); NRF.setServices({ 0x1809 : { // Temp 0x2A6E: { // Temperature readable: true, value : [E.getTemperature().toFixed(2)] }}, 0x180F : { // Battery Service 0x2A19: { // Battery Level readable: true, value : [Puck.getBatteryPercentage().toFixed(0)] } } });
-
-
@Gordon a dead end ?
Connected > >dump() pinMode(D29, "input_pulldown", true); =undefined >for (var i=(120-3)*4096;i<120*4096;i+=32) { : var s = i.toString(16); : for (var x=0;x<32;x+=4) : s+=" "+("00000000"+peek32(i+x).toString(16)).substr(-8); : console.log(s); :} 75000 ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff 75020 ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff 75040 ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff 75060 ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ... 77f60 ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff 77f80 ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff 77fa0 ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff 77fc0 ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff 77fe0 ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff deadbeef =undefined >save() Disconnected
-
@Gordon Im not sure what the difference is but once a save from the command line stops working the only way I can get it back it be blanking out the code window and setting save on load and saving. Once that save is done, running save() on the command line works !
Connected > >dump() pinMode(D29, "input_pulldown", true); =undefined >save() Disconnected Connected > >dump() pinMode(D29, "input_pulldown", true); =undefined > _____ _ | __|___ ___ ___ _ _|_|___ ___ | __|_ -| . | _| | | | | . | |_____|___| _|_| |___|_|_|_|___| |_| http://espruino.com 1v91 Copyright 2016 G.Williams >Erasing Flash..... Writing... Compressed 32000 bytes to 8 Checking... Done! Loading 8 bytes from flash... =undefined >dump() pinMode(D29, "input_pulldown", true); =undefined >save() =undefined Erasing Flash..... Writing.... Compressed 32000 bytes to 1174 Checking... Done! >dump() pinMode(D29, "input_pulldown", true); =undefined > _____ _ | __|___ ___ ___ _ _|_|___ ___ | __|_ -| . | _| | | | | . | |_____|___| _|_| |___|_|_|_|___| |_| http://espruino.com 1v91 Copyright 2016 G.Williams >Erasing Flash..... Writing... Compressed 32000 bytes to 8 Checking... Done! Loading 8 bytes from flash... =undefined >load() =undefined Loading 8 bytes from flash... >dump() pinMode(D29, "input_pulldown", true); =undefined > 1 SENT
-
Having similar issues, I've been setting NRF Services and trying to save the code getting disconnects. I've manged to do a reset ( insert battery, hold button, wait for self test to finish ) then ran your code above and tried a save() ... disconnected. I think only the last part of the log is the interesting part "BT> SEND ERROR: NotSupportedError: GATT operation failed for unknown reason."
BT> Sending "s" BT> Sent BT> RX:"s" BT> Sending "a" BT> Sent BT> RX:"a" BT> Sending "c" BT> Sent BT> RX:"c" BT> Sending "v" BT> Sent BT> Sending "e" BT> RX:"v" BT> Sent BT> RX:"e" BT> Sending "\b" BT> Sent BT> RX:"\b \b" BT> Sending "\b" BT> Sent BT> RX:"\b \b" BT> Sending "\b" BT> Sent BT> RX:"\b \b" BT> Sending "v" BT> Sent BT> RX:"v" BT> Sending "e" BT> Sent BT> RX:"e" BT> Sending "(" BT> Sent BT> RX:"(" BT> Sending ")" BT> Sent BT> RX:")" BT> Sending "\r" BT> SEND ERROR: NotSupportedError: GATT operation failed for unknown reason. Disconnect callback... WARNING: [notify_warn] Disconnected >>> Disconnected
-
-
-
I'm planning on offering MDBT42 modules (the ones used in Puck.js)
pre-programmed with Espruino, and potentially offering them on a
break-out board.Yes please @Gordon.
-
-
Winner ! :-)