You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • The IDE just connects using the 'Nordic UART' bluetooth characteristics that Espruino provides, and sends character data over the REPL (which is basically what you see on the left-hand side of the IDE).

    So if you want to write a program to flash, you need to generate the JavaScript to write that in, which might look like:

    require("Storage").write(".bootcde","pri­nt('hello world')");

    You need to put a newline after it (to cause it to be executed) and it helps to put char code 16 right before, and that tells Espruino not to 'echo' the line back to you, which can slow things down.

    Actually creating the code to do that can be a bit of a pain, so we have a tool (basically the Espruino IDE as a command-line app):

    Rather than connecting, it can spit out a file which is the commands which you should send in order to upload the code. See Not Connecting in

    The command can look a bit like:

    espruino --board PUCKJS --minify mycode.js -o output.js

    Some more info on doing the connection itself is at­etooth-le


Avatar for Gordon @Gordon started