Closed CodeHub-Anup closed 6 years ago
What's the error? Can you provide example code?
const char csPin = 10; // LoRa radio chip select
const char resetPin = 9; // LoRa radio reset
const char irqPin = 2; // change for your board; must be a hardware interrupt pin
const char csPin2 = 8; // LoRa radio chip select
const char resetPin2 = 7; // LoRa radio reset
const char irqPin2 = 3; // change for your board; must be a hardware interrupt pin
LoRaClass LoRaT;
void setup() {
Serial.begin(9600);
Serial.println("LoRa Receiver");
LoRa.setPins(csPin, resetPin, irqPin);
if (!LoRa.begin(866E6)) {
Serial.println("Starting LoRa failed!");
while (1);
}
LoRaT.setPins(csPin2, resetPin2, irqPin2);
int v = LoRaT.begin(866E6);
if (!v) {
Serial.println(v);
Serial.println("Starting LoRa Two failed!");
while (1);
}
The Output is:
LoRa Receiver
0
Starting LoRa Two failed!
If you try just the second set of pins on the regular LoRa
does it work?
Yes.
Have you tried an 3.3V external power supply?
What does LoRa.dumpRegisters(Serial)
and LoRaT.dumpRegisters(Serial)
output?
Closing this for now due to lack of activity.
Hi, I tried connecting two rfm95 modules to arduino mega. I have used the same SPI pins but different SS, RST and interrupt pins. I defined a new Lora class and set the new SPI pins using the new lora class, but .begin() throws up an error? Is there any way to achieve this?