-
Notifications
You must be signed in to change notification settings - Fork 15
Hardware Configuration
Chandra Wijaya Sentosa edited this page Jan 12, 2022
·
1 revision
Power pins, SPI pins, RESET
, and BUSY
pins must be connected between host controller and LoRa module. If you want to use interrupt operation, you can connect one of DIO1
, DIO2
, or DIO3
pin. You also should connect TXEN
and RXEN
pins if your LoRa module have those pins.
The default SPI port is using bus id 0 and cs id 0. The default GPIO pins used for connecting to SX126x with Broadcom pin numbering are as follows.
Semtech SX126x | Raspberry Pi |
---|---|
VCC | 3.3V |
GND | GND |
SCK | GPIO 11 |
MISO | GPIO 9 |
MOSI | GPIO 10 |
NSS | GPIO 8 |
RESET | GPIO 22 |
BUSY | GPIO 23 |
DIO1 | -1 (unused) |
TXEN | -1 (unused) |
RXEN | -1 (unused) |
To configure SPI port or SPI frequency call setSPI()
method before begin()
method.
# set to use SPI with bus id 0 and cs id 1 and speed 7.8 Mhz
LoRa.setSPI(0, 0, 7800000)
LoRa.begin()
To configure I/O pins (NSS, RESET, BUSY, IRQ, TXEN, RXEN pin) call setPins()
before begin()
method.
# set RESET->22, BUSY->23, DIO1->26, TXEN->5, RXEN->25
LoRa.setPins(22, 23, 26, 5, 25)
LoRa.begin()