>>> Minification complete Uploading 3933 bytes to flash Got "" No Prompt found, got undefined - issuing Ctrl-C to try and break out Splitting for Ctrl-C, delay 250 Still no prompt - issuing another Ctrl-C Splitting for Ctrl-C, delay 250 >>> Sending... ---> "\u0010reset();\n\u0010setTime(1601129515.193);E.setTimeZone(1)\n\u0010\u001b[1drequire(\"Storage\").write(\".bootcde\",\"Modules.addCached(\\\"INA226\\\",function(){function d(a,b){this.i2c=a;b=b||{};this.addr=b.addr||64;this.maxCurrent=b.maxCurrent||10;this.currentLSB=this.maxCurrent/32768;this.shunt=b.shunt||.1;if(21577!=this.rd(254))throw Error(\\\"Invalid manufacturer ID\\\");b.average=b.average||256;var c=[1,4,16,64,128,256,512,1024].indexOf(b.average);if(0>c)throw Error(\\\"average must be 1,4,16,64,128,256,512 or 1024\\\");this.wr(0,16679|c<<9);c=Math.round(.00512/(this.currentLSB*this.shunt));if(0>c||32767>8,b])};d.prototype.rds=function(a){a=this.rd(a);return a&32768?a-65536:a};d.prototype.read=function(){var a=this.rd(6);return{vshunt:2.5E-6*this.rds(1),vbus:.00125*this.rd(2),power:25*this.rd(3)*this.currentLSB,current:this.rds(4)*this.currentLSB,overflow:0!=(a&4)}};expo\",0,3933);\n\u0010\u001b[2drequire(\"Storage\").write(\".bootcde\",\"rts=d});\\n//voltage\\nvar vV = 'na1';\\nvar vL = 'na2';\\nvar inaV = null;\\nvar inaL = null;\\n//temp\\nvar config = {seconds:5};\\nvar c=0;\\nvar historyT = new Int16Array(1000);\\nvar historyVan = new Int16Array(1000);\\nvar historyLeisure = new Int16Array(1000);\\nvar screenState = 0;\\n\\nvar lastSetT = 0;\\n\\nfunction setup226()\\n{\\n try\\n {\\n var i2cV = new I2C();\\n var i2cL = new I2C();\\n var c = 0;\\n i2cV.setup({sda:D0, scl:D1}); //van.\\n i2cL.setup({sda:A4, scl:A5}); //leisure\\n\\n // initialise INA226\\n var INA226a = require(\\\"INA226\\\");\\n var INA226b = require(\\\"INA226\\\");\\n inaV = new INA226a(i2cV, {\\n average:1024\\n });\\n inaL = new INA226b(i2cL, {\\n average:1024\\n });\\n }\\n catch(e)\\n {\\n inaV = null;\\n inaL = null;\\n print(e);\\n }\\n}\\n\\nsetup226();\\n\\n\\n\\nvar screenInt = setInterval(x=>screenUpdate(),1000);\\nvar logInt = setInterval(x=>log(), config.seconds*1000);\\n\\necho(0);\\nsetWatch(x=>setScreen(),BTN1, {repeat:true});\\n\\nfunction setT(nt)\\n{\\n setTime((new Date(nt)).getTime()/1000);\\n}\\n\\nfunction screenU\",1024);\n\u0010\u001b[3drequire(\"Storage\").write(\".bootcde\",\"pdate() {\\n g.clear();\\n g.setFontBitmap();\\n var b = E.getBattery();\\n var timeNow = new Date(Math.floor(getTime()*1000));\\n g.drawString(\\\"Counter: \\\"+c,1,0);\\n g.drawString(\\\"Battery: \\\"+b+\\\"%\\\",70,0);\\n g.drawString(\\\"Van:\\\",1,10);\\n g.drawString(\\\"Leisure:\\\",70,10);\\n \\n g.setFontVector(15);\\n g.drawString(vV+\\\"v\\\",1,20);\\n g.drawString(vL+\\\"v\\\",70,20);\\n\\n g.setFontVector(10);\\n g.drawString(timeNow.toISOString().slice(11, 19),1,50);\\n var te = E.getTemperature().toFixed(1);\\n g.drawString(te+\\\"ºC\\\",70,50);\\n\\n g.flip();\\n}\\n\\n\\n\\n// A function to store the data in the history\\nfunction log() {\\n c++;\\n vV = inaV!=null?inaL.read().vbus.toFixed(1):\\\"n/a\\\";\\n vL = inaL!=null?inaV.read().vbus.toFixed(1):\\\"n/a\\\";\\n // move all history values back by one\\n historyT.set(new Int16Array(historyT.buffer,2));\\n historyLeisure.set(new Int16Array(historyLeisure.buffer,2));\\n historyVan.set(new Int16Array(historyVan.buffer,2));\\n // set the last history value to the current temperature *10 ie 1dp\\n var t = E.getTemperature().toFixed(1)*10;\\n h\",2048);\n\u0010\u001b[4drequire(\"Storage\").write(\".bootcde\",\"istoryT[historyT.length-1] = t;\\n historyLeisure[historyLeisure.length-1] = vL*10;\\n historyVan[historyVan.length-1] = vV*10;\\n lastSetT = Math.floor(getTime()*1000);\\n}\\n\\nfunction setScreen() \\n{\\n switch(screenState){\\n case 0 :\\n {Pixl.setLCDPower(1);LED1.reset();screenState=1;break;}\\n case 1 :\\n {LED1.set();screenState=2;break;}\\n case 2 :\\n {Pixl.setLCDPower(0);LED1.reset();screenState=0;break;}\\n }\\n}\\n\\nfunction returnData(what)\\n{\\n var temp = what==1?E.getTemperature().toFixed(1)*10:historyT;\\n var van = what==1?vV:historyVan;\\n var leisure = what==1?vL:historyLeisure;\\n\\n echo(0);\\n var o = {\\n 'config':config,\\n 'count':c,\\n 'lastRecorded':lastSetT,\\n 'items':{\\n 'temp':temp,\\n 'van':van,\\n 'leisure':leisure}\\n };\\n var output = JSON.stringify(o);\\n for (var i=0;i<=output.length;i+=384) console.log(btoa(output.substr(i,384)));\\n}\",3072);\n\u0010\u001b[5dload()\n\n" Splitting for reset(), delay 250 >>> Sent BT> Disconnected (gattserverdisconnected) Disconnect callback... {"port":"Pixl.js 361e","portName":"Pixl.js 361e"} WARNING: [notify_warn] Disconnected from Pixl.js 361e >>> Disconnected from Pixl.js 361e >>> Connecting... Set Slow Write = true BT> Pre-paired Web Bluetooth device already found >>> Connecting to Pixl.js 361e BT> Device Name: Pixl.js 361e BT> Device ID: WIB5gTxzCaHDSK5ux20tag== >>> Connected to BLE BT> Connected >>> Configuring BLE... BT> Got service >>> Configuring BLE.... BT> RX characteristic:{} >>> Configuring BLE.... >>> Configuring BLE..... BT> TX characteristic:{} >>> Configuring BLE..... Set Slow Write = false >>> BLE configured. Receiving data... Connected [object Object] Got "" No Prompt found, got undefined - issuing Ctrl-C to try and break out Splitting for Ctrl-C, delay 250 Still no prompt - issuing another Ctrl-C Splitting for Ctrl-C, delay 250 >>> Sending... ---> "\u0010print(\"<\",\"<<\",JSON.stringify(process.env),\">>\",\">\")\n" >>> Sent >>> Receiving... Got "< << {\"VERSION\":\"2v06\",\"GIT_COMMIT\":\"21168a2b\",\"BOARD\":\"PIXLJS\",\"FLASH\":524288,\"STORAGE\":36864,\"RAM\":65536,\"SERIAL\":\"16d71f71-47ac7c95\",\"CONSOLE\":\"Bluetooth\",\"MODULES\":\"Flash,Storage,heatshrink,fs,net,dgram,http,NetworkJS,WIZnet,crypto,neopixel,graphical_menu\",\"EXPTR\":536882640} >> >\r\n" >>> [notify_info] Found PIXLJS, 2v06 Loading https://www.espruino.com/json/PIXLJS.json Board JSON loaded Firmware >1.43 supports faster writes over USB Set Slow Write = false FIRMWARE: Current 2v06, Available 2v07 Device found {"portName":"Pixl.js 361e"} [success] Connected to Pixl.js 361e >>> Connected to Pixl.js 361e >>> Loading modules loadModule(INA226) - INA226 requires [] >>> Minifying >>> Minification complete Uploading 3933 bytes to flash Got "" No Prompt found, got undefined - issuing Ctrl-C to try and break out Splitting for Ctrl-C, delay 250 Still no prompt - issuing another Ctrl-C Splitting for Ctrl-C, delay 250 >>> Sending... ---> "\u0010reset();\n\u0010setTime(1601219695.255);E.setTimeZone(1)\n\u0010\u001b[1drequire(\"Storage\").write(\".bootcde\",\"Modules.addCached(\\\"INA226\\\",function(){function d(a,b){this.i2c=a;b=b||{};this.addr=b.addr||64;this.maxCurrent=b.maxCurrent||10;this.currentLSB=this.maxCurrent/32768;this.shunt=b.shunt||.1;if(21577!=this.rd(254))throw Error(\\\"Invalid manufacturer ID\\\");b.average=b.average||256;var c=[1,4,16,64,128,256,512,1024].indexOf(b.average);if(0>c)throw Error(\\\"average must be 1,4,16,64,128,256,512 or 1024\\\");this.wr(0,16679|c<<9);c=Math.round(.00512/(this.currentLSB*this.shunt));if(0>c||32767>8,b])};d.prototype.rds=function(a){a=this.rd(a);return a&32768?a-65536:a};d.prototype.read=function(){var a=this.rd(6);return{vshunt:2.5E-6*this.rds(1),vbus:.00125*this.rd(2),power:25*this.rd(3)*this.currentLSB,current:this.rds(4)*this.currentLSB,overflow:0!=(a&4)}};expo\",0,3933);\n\u0010\u001b[2drequire(\"Storage\").write(\".bootcde\",\"rts=d});\\n//voltage\\nvar vV = 'na1';\\nvar vL = 'na2';\\nvar inaV = null;\\nvar inaL = null;\\n//temp\\nvar config = {seconds:1};\\nvar c=0;\\nvar historyT = new Int16Array(1000);\\nvar historyVan = new Int16Array(1000);\\nvar historyLeisure = new Int16Array(1000);\\nvar screenState = 0;\\n\\nvar lastSetT = 0;\\n\\nfunction setup226()\\n{\\n try\\n {\\n var i2cV = new I2C();\\n var i2cL = new I2C();\\n var c = 0;\\n i2cV.setup({sda:D0, scl:D1}); //van.\\n i2cL.setup({sda:A4, scl:A5}); //leisure\\n\\n // initialise INA226\\n var INA226V = require(\\\"INA226\\\");\\n var INA226L = require(\\\"INA226\\\");\\n inaV = new INA226V(i2cV, {\\n average:1024\\n });\\n inaL = new INA226L(i2cL, {\\n average:1024\\n });\\n }\\n catch(e)\\n {\\n inaV = null;\\n inaL = null;\\n print(e);\\n }\\n}\\n\\nsetup226();\\n\\n\\n\\nvar screenInt = setInterval(x=>screenUpdate(),2000);\\nvar logInt = setInterval(x=>log(), config.seconds*1000);\\n\\necho(0);\\nsetWatch(x=>setScreen(),BTN1, {repeat:true});\\n\\nfunction setT(nt)\\n{\\n setTime((new Date(nt)).getTime()/1000);\\n}\\n\\nfunction screenU\",1024);\n\u0010\u001b[3drequire(\"Storage\").write(\".bootcde\",\"pdate() {\\n g.clear();\\n g.setFontBitmap();\\n var b = E.getBattery();\\n var timeNow = new Date(Math.floor(getTime()*1000));\\n g.drawString(\\\"Counter: \\\"+c,1,0);\\n g.drawString(\\\"Battery: \\\"+b+\\\"%\\\",70,0);\\n g.drawString(\\\"Van:\\\",1,10);\\n g.drawString(\\\"Leisure:\\\",70,10);\\n \\n g.setFontVector(15);\\n g.drawString(vV+\\\"v\\\",1,20);\\n g.drawString(vL+\\\"v\\\",70,20);\\n\\n g.setFontVector(10);\\n g.drawString(timeNow.toISOString().slice(11, 19),1,50);\\n var te = E.getTemperature().toFixed(1);\\n g.drawString(te+\\\"ºC\\\",70,50);\\n\\n g.flip();\\n}\\n\\n\\n\\n// A function to store the data in the history\\nfunction log() {\\n c++;\\n vV = inaV!=null?inaV.read().vbus.toFixed(1):\\\"n/a\\\";\\n vL = inaL!=null?inaL.read().vbus.toFixed(1):\\\"n/a\\\";\\n // move all history values back by one\\n historyT.set(new Int16Array(historyT.buffer,2));\\n historyLeisure.set(new Int16Array(historyLeisure.buffer,2));\\n historyVan.set(new Int16Array(historyVan.buffer,2));\\n // set the last history value to the current temperature *10 ie 1dp\\n var t = E.getTemperature().toFixed(1)*10;\\n h\",2048);\n\u0010\u001b[4drequire(\"Storage\").write(\".bootcde\",\"istoryT[historyT.length-1] = t;\\n historyLeisure[historyLeisure.length-1] = vL*10;\\n historyVan[historyVan.length-1] = vV*10;\\n lastSetT = Math.floor(getTime()*1000);\\n}\\n\\nfunction setScreen() \\n{\\n switch(screenState){\\n case 0 :\\n {Pixl.setLCDPower(1);LED1.reset();screenState=1;break;}\\n case 1 :\\n {LED1.set();screenState=2;break;}\\n case 2 :\\n {Pixl.setLCDPower(0);LED1.reset();screenState=0;break;}\\n }\\n}\\n\\nfunction returnData(what)\\n{\\n var temp = what==1?E.getTemperature().toFixed(1)*10:historyT;\\n var van = what==1?vV:historyVan;\\n var leisure = what==1?vL:historyLeisure;\\n\\n echo(0);\\n var o = {\\n 'config':config,\\n 'count':c,\\n 'lastRecorded':lastSetT,\\n 'items':{\\n 'temp':temp,\\n 'van':van,\\n 'leisure':leisure}\\n };\\n var output = JSON.stringify(o);\\n for (var i=0;i<=output.length;i+=384) console.log(btoa(output.substr(i,384)));\\n}\",3072);\n\u0010\u001b[5dload()\n\n" Splitting for reset(), delay 250 BT> SEND ERROR: NotSupportedError: GATT operation failed for unknown reason. BT> Disconnected (gattserverdisconnected) Disconnect callback... {"port":"Pixl.js 361e","portName":"Pixl.js 361e"} WARNING: [notify_warn] Disconnected from Pixl.js 361e >>> Disconnected from Pixl.js 361e >>> Connecting... Set Slow Write = true BT> Pre-paired Web Bluetooth device already found >>> Connecting to Pixl.js 361e BT> Device Name: Pixl.js 361e BT> Device ID: WIB5gTxzCaHDSK5ux20tag== BT> ERROR: NetworkError: Connection failed for unknown reason. ERROR: [notify_error] Connection Failed. >>> Connection Failed. >>> Connecting... Set Slow Write = true BT> Pre-paired Web Bluetooth device already found >>> Connecting to Pixl.js 361e BT> Device Name: Pixl.js 361e BT> Device ID: WIB5gTxzCaHDSK5ux20tag== BT> ERROR: NetworkError: Connection failed for unknown reason. ERROR: [notify_error] Connection Failed. >>> Connection Failed. >>> Connecting... Set Slow Write = true BT> Pre-paired Web Bluetooth device already found >>> Connecting to Pixl.js 361e BT> Device Name: Pixl.js 361e BT> Device ID: WIB5gTxzCaHDSK5ux20tag== BT> ERROR: NetworkError: Connection failed for unknown reason. ERROR: [notify_error] Connection Failed. >>> Connection Failed.