Replies: 1 comment
-
This drive is not compatible with SX1262, only the older SX127x series. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Pls help! Why my Lora Starting failed???
#include <SPI.h>
#include <LoRa.h>
int counter = 0;
// custom_SPI
int custom_MOSI = 37;
int custom_MISO = 39;
int custom_SCK = 35;
const int custom_SS = 33;
//Lora Pin
// int lora_reset = NULL;
// int lora_dio0 = 11;
void setup() {
Serial.begin(9600);
while (!Serial);
delay(2000);
pinMode(custom_SCK,OUTPUT);
pinMode(custom_MISO,OUTPUT);
pinMode(custom_MOSI,INPUT_PULLUP);
pinMode(custom_SS,OUTPUT);
// Initial custom_SPI
SPI.begin(custom_SCK, custom_MISO, custom_MOSI, custom_SS);
// Print custom_SPI pin
Serial.print("Custom MOSI: ");
Serial.println(custom_MOSI);
Serial.print("Custom MISO: ");
Serial.println(custom_MISO);
Serial.print("Custom SCK: ");
Serial.println(custom_SCK);
Serial.print("Custom SS: ");
Serial.println(custom_SS);
Serial.println("");
// Serial.println("LoRa Sender");
// LoRa.setPins(custom_SS, reset, lora_dio0);
// Serial.print("Custom_SS: ");
// Serial.println(custom_SS);
// Serial.print("reset: ");
// Serial.println(reset);
// Serial.print("lora_dio0: ");
// Serial.println(lora_dio0);
while (!LoRa.begin(915E6)) {
Serial.println("Starting LoRa failed!");
delay(1000);
// while (1);
}
}
void loop() {
Serial.print("Sending packet: ");
Serial.println(counter);
// send packet
LoRa.beginPacket();
LoRa.print("hello ");
LoRa.print(counter);
LoRa.endPacket();
counter++;
delay(5000);
}
Beta Was this translation helpful? Give feedback.
All reactions