Writing to Espruino Flash without IDE #1086
Replies: 2 comments
-
Posted at 2023-03-06 by @gfwilliams 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:
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): https://www.npmjs.com/package/espruino Rather than connecting, it can spit out a file which is the commands which you should send in order to upload the code. See The command can look a bit like:
Some more info on doing the connection itself is at https://www.espruino.com/Interfacing#bluetooth-le |
Beta Was this translation helpful? Give feedback.
-
Posted at 2023-03-07 by user154225 Thank you, I'll look into that! |
Beta Was this translation helpful? Give feedback.
-
Posted at 2023-03-04 by user154225
I need to write code to Puck.Js and Bangle.Js flash memory with an Android app I'm writing.
How does the IDE send data to the device? I get that it's minimising the code but after that I have no idea.
Beta Was this translation helpful? Give feedback.
All reactions