I have the same issue if "Save on send" is enabled.
function tempTo2a6e(temp) {
var f = parseFloat(temp.toFixed(2)) * 100;
if (tempTo2a6e.buf === undefined) tempTo2a6e.buf = new Uint8Array(2);
tempTo2a6e.buf[0] = f & 0xff;
tempTo2a6e.buf[1] = f >> 8 & 0xff;
return tempTo2a6e.buf;
}
NRF.on('connect', function(){
digitalPulse(LED2, 1, 250);
});
NRF.setServices({
0x181A: { // Health Thermometer
0x2A6E: { // Temperature
readable: true,
value : tempTo2a6e(E.getTemperature())
}},
0x180F : { // Battery Service
0x2A19: { // Battery Level
readable: true,
notify: true,
value : [Puck.getBatteryPercentage()]
}}});
setInterval(function(){
NRF.updateServices({
0x181A: { // Health Thermometer
0x2A6E: { // Temperature
value : tempTo2a6e(E.getTemperature())
}},
0x180F: {
0x2A19: {
value : [Puck.getBatteryPercentage()]
}
}
});
}, 60000);
After few seconds, i get this error:
Writing...ERROR: Prompt not detected - upload failed. Trying to
recover... Compressed 32000 bytes to 956 Checking... Flash Magic Byte
is wrong There were 1 errors! Uncaught InternalError: Timeout on
jshFlashErasePage at line 1 col 1005 ...\n }\n });\n},
60000);");load();
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I have the same issue if "Save on send" is enabled.
After few seconds, i get this error: