Most recent activity
-
Hi guys,
Thanks for making this work on NRF52840; Espruino mostly works now with a MDBT50Q on my own board. However, when trying to save to flash with save() in the REPL, the console hangs on "Calculating Size...". I have tried erasing storage with require("Storage").eraseAll() without result:>require("Storage").eraseAll() Uncaught InternalError: Timeout on jshFlashErasePage at line 1 col 29 require("Storage").eraseAll() ^ >require("Storage").eraseAll() =undefined
I'm using a copy of the NRF52840DK.py board file and use J-LINK to flash the *.hex binary.
Status quo is that I can run any code, use GPIO 1, but not save it and run from boot. Also "Save on send" does not work. It just hangs forever, until I press CTRL+C, which yields "Execution Interrupted". Sometimes I get a message "Got ?[255] expected ','" when pressing CTRL+C, and the REPL points to the }); at line 3 of the code below. In that case, it executes the LED trigger with setInterval, except for the setWatch function. Using 'dump()' gives then the same error message.
The code that I try to upload:
setWatch(function() { print("Button was pressed"); }, BTN1, {repeat: true, edge:"rising", debounce:50}); var on = false; setInterval(function() { on = !on; LED2.write(on); },50);
BTN1 is connected to GPIO1 (D36) and LED2 to D8. Serial1 is working, and connected to an external module. REPL over USB is not working, Bluetooth works without problems. Using Espruino 2v03.12.
Any thoughts?
I think you are right @Gordon about the board.py configuration; will look into it a bit more.
IMHO the NRF52840 is indeed nice because of the dedicated USB, and e.g. Thread (IEEE 802.15.4 / 6LowPan based) protocol support. Also, it has a nice amount of GPIO for advanced set-ups :)