Why does the following code work just fine on the Pixl.js when code is uploaded to RAM, but when I use "Save on Send (to Flash)", or save() it wrapped in an onInit() function, does it just print "Sending.." and then stop?
SPI1.setup({ sck:D3, miso:D4, mosi:D5 });
var sx = require("SX127x").connect({spi: SPI1, cs: D6, rst : D7 });
var config = {
forcePaBoost: true,
};
clearInterval();
// Until DIO0 line irqs are implemented we need this:
setInterval(function() { sx.onIRQ(); }, 100);
sx.setTxConfig(config);
console.log('Sending..');
sx.send("Hello", function() {
console.log("TX done");
});
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.
Why does the following code work just fine on the Pixl.js when code is uploaded to RAM, but when I use "Save on Send (to Flash)", or save() it wrapped in an onInit() function, does it just print "Sending.." and then stop?