So to be completely clear, this is what's not working for me 🙂:
const PIN_SCK = D18; const PIN_MISO = D19; const PIN_MOSI = D23; const PIN_CS = D5; // NSS const PIN_RESET = D21; // Configuration const txConfig = { bandwidth: 0, freq: 434330000, power: 17, forcePaBoost: true, }; // HW SPI (replace the three lines above) SPI2.setup({ sck: PIN_SCK, miso: PIN_MISO, mosi: PIN_MOSI }); const sx = require("SX127x").connect({ spi: SPI2, cs: PIN_CS, rst: PIN_RESET }); // Poll DIO0 for interrupts setInterval(function () { sx.onIRQ(); }, 100); sx.setTxConfig(txConfig); // Transmit sx.send("Hello", function () { console.log("TX done"); });
(Edit: Perhaps I should try to remove the SX127x stuff, and boil it down to only using the SPI, I'll be back.)
@rj started
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.
So to be completely clear, this is what's not working for me 🙂:
(Edit: Perhaps I should try to remove the SX127x stuff, and boil it down to only using the SPI, I'll be back.)