1
0
mirror of https://github.com/sandeepmistry/arduino-LoRa.git synced 2025-06-14 07:02:25 +03:00

Add support for Arduino MKR WAN 1300 boards (#105)

* Add support for Arduino MKR WAN 1300 board
* Add new LoRa.setSPI(...) API to use radio with a different SPI interface
* Disable LoRa.onReceive(...) and LoRa.receive() on Arduino MKR WAN 1300
* Add errors on sketches not compatible with the Arduino MKR WAN 1300
This commit is contained in:
Sandeep Mistry
2018-05-07 13:02:06 -04:00
committed by GitHub
parent a2636d10a9
commit 039b138d80
7 changed files with 82 additions and 14 deletions

View File

@ -15,6 +15,10 @@
#include <SPI.h> // include libraries
#include <LoRa.h>
#ifdef ARDUINO_SAMD_MKRWAN1300
#error "This example is not compatible with the Arduino MKR WAN 1300 board!"
#endif
const int csPin = 7; // LoRa radio chip select
const int resetPin = 6; // LoRa radio reset
const int irqPin = 1; // change for your board; must be a hardware interrupt pin

View File

@ -1,6 +1,10 @@
#include <SPI.h>
#include <LoRa.h>
#ifdef ARDUINO_SAMD_MKRWAN1300
#error "This example is not compatible with the Arduino MKR WAN 1300 board!"
#endif
void setup() {
Serial.begin(9600);
while (!Serial);