#include <LoRa.h>
const int LoRaRST = 6; // RST pin
const int LoRaDI00 = 2; // DI00 pin
const int LoRaSCK = 18; // SCK pin
const int LoRaMISO = 19; // MISO pin
const int LoRaMOSI = 23; // MOSI pin
const int LoRaNSS = 4; // NSS (Chip Select) pin
void setup() {
Serial.begin(115200);
while (!Serial);
delay(100);
pinMode(LoRaRST, OUTPUT);
pinMode(LoRaDI00, INPUT);
pinMode(LoRaSCK, OUTPUT);
pinMode(LoRaMISO, INPUT);
pinMode(LoRaMOSI, OUTPUT);
pinMode(LoRaNSS, OUTPUT);
digitalWrite(LoRaRST, LOW);
delay(10);
digitalWrite(LoRaRST, HIGH);
Serial.println("Before LoRa Initialization");
if (!LoRa.begin(868E6)) {
Serial.println("Starting LoRa failed!");
while (1);
}
Serial.println("After LoRa Initialization");
}
void loop() {
}