I believe it's to do with execution speed. It turns out require("SX127x").connect doesn't execute immediately, and so you should only use it maybe 10ms after calling it.
When you upload you get that delay automatically because of the upload, but executing from flash it's too quick.
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 believe it's to do with execution speed. It turns out
require("SX127x").connect
doesn't execute immediately, and so you should only use it maybe 10ms after calling it.When you upload you get that delay automatically because of the upload, but executing from flash it's too quick.
Just doing:
should do it - ideally there should be a callback function when initialisation is done