// Tested on Puck.js
var f = new (require("FlashEEPROM"))();
f.erase();
console.log(f);
f.write(0, 'Hello Flash.');
console.log(E.toString(f.read(0)));
and got:
1v90 Copyright 2016 G.Williams
>Uncaught InternalError: Timeout on jshFlashErasePage
at line 1 col 31
this.flash.erasePage(this.addr)
^
in function "erase" called from line 1 col 9
f.erase();
^
{
"flash": function () { [native code] },
"addr": 471040, "endAddr": 475136 }
Uncaught InternalError: Timeout on jshFlashWrite
at line 1 col 62
...,a.length,a.length>>8,0]),b);b+=4;4!=a.length&&(c=new Uint8A...
^
in function "_write" called from line 2 col 102
...ory!";this._write(a.end,b,c)
^
in function "write" called from line 1 col 26
f.write(0, 'Hello Flash.');
^
ÿÿÿÿÿÿÿÿÿÿÿÿ
=undefined
>
Am I doing something stupidly wrong or do I have a faulty puck?
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.
Ok, I tried the code below:
and got:
Am I doing something stupidly wrong or do I have a faulty puck?
Thanks again