function loraHandler(err, data){
if (err) console.log("RX ERROR");
else console.log("RX>", data);
}
console.log("all starting on ESP8266...");
SPI1.setup({ sck:D14, miso:D12, mosi:D13 });
var sx = require("SX127x").connect({spi: SPI1, cs: D15});
// Until DIO0 line irqs are implemented we need this:
setInterval(function() { sx.onIRQ(); }, 100);
var config = { rxContinuous : true };
sx.setRxConfig(config);
sx.rx(loraHandler);
setTimeout(function() {
console.log("going standby");
sx.standby();
}, 10000);
// vim: ai ts=2 sts=2 et sw=2 ft=javascript
and the output:
_____ _
| __|___ ___ ___ _ _|_|___ ___
| __|_ -| . | _| | | | | . |
|_____|___| _|_| |___|_|_|_|___|
|_| http://espruino.com
1v92 Copyright 2016 G.Williams
Espruino is Open Source. Our work is supported
only by sales of official boards and donations:
http://espruino.com/Donate
Flash map 4MB:512/512, manuf 0xe0 chip 0x4016
>all starting on ESP8266...
=undefined
Uncaught Error: Radio not found!
at line 1 col 63
...ow Error("Radio not found!");this.setOpMode(0);this.mask(1,1...
^
in function called from system
going standby
>
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.
all new with espruino on esp8266.
found the module https://www.espruino.com/SX127x same chip in the RFM95.
RFM95 (868mhz) pinout attached:
Really nothing happens here, the callback is not called.
How to check if radio is working? how to debug those?
thanks for any help.
by the way does anybody knows how to avoid showing crap chars when reseting the board (before espruino logo).
connections:
code:
and the output:
1 Attachment