-
Notifications
You must be signed in to change notification settings - Fork 20
Hardware Configuration
Chandra Wijaya Sentosa edited this page Jan 12, 2022
·
1 revision
Power pins, SPI pins, and RESET
pin must be connected between arduino and LoRa module. For SX126x series and LLCC68, a BUSY
pin also must be connected. If you want to use interrupt operation, you can connect DIO0
for SX127x series and one of DIO1
, DIO2
, or DIO3
pin for SX126x series. You also should connect TXEN
and RXEN
pins if your LoRa module have those pins.
The default Arduino pins used for connecting to SX126x and SX127x are as follows.
Semtech SX126x | Semtech SX127x | Arduino |
---|---|---|
VCC | VCC | 3.3V |
GND | GND | GND |
SCK | SCK | SCK |
MISO | MISO | MISO |
MOSI | MOSI | MOSI |
NSS | NSS | 10 |
RESET | RESET | 9 |
BUSY | 4 | |
DIO1 | DIO0 | -1 (unused) |
TXEN | TXEN | -1 (unused) |
RXEN | RXEN | -1 (unused) |
To change Arduino default SPI port or SPI frequency call setSPI()
method before begin()
method.
LoRa.setSPI(SPI2, F_CPU/2);
LoRa.begin();
To configure I/O pins (NSS, RESET, BUSY, IRQ, TXEN, RXEN pin) call setPins()
before begin()
method.
// set NSS->10, RESET->9, BUSY->4, DIO1->2, TXEN->8, RXEN->7 for SX126x series
LoRa.setPins(10, 9, 2, 4, 8, 7);
// set NSS->10, RESET->9, DIO0->2, TXEN->8, RXEN->7 for SX127x series
LoRa.setPins(10, 9, 2, 8, 7);
LoRa.begin();