Hi, I'm trying to use Arduino uno, ethernet shield w5100 and lora shield, I changed pins via setPins but I can´t get it work, everytime I run the code I get the same error Lora Init Failed. I changed jumper SV2, SV3, SV4 from right(default) to left according to this site information http://wiki.dragino.com/index.php?title=Lora_Shield.
I also changed those lines referred to pins in file LoRa.h, but I hasn´t worked.
define LORA_DEFAULT_SS_PIN 10
define LORA_DEFAULT_RESET_PIN 9
`#include
include
define TX_PACKET_MAX_SIZE 9
define baud 9600
float lux = 0.f;
const int Lora_SS = 8;
const int Lora_RST = 7;
const int Lora_DIO0 = 2;
// override the default CS, reset, and IRQ pins (optional)
LoRa.setPins(Lora_SS, Lora_RST, Lora_DIO0); // set CS, reset, IRQ pin
delay(200);
Serial.begin(baud); // initialize serial
while (!Serial);
if (!LoRa.begin(915E6)) { // initialize ratio at 915 MHz
Serial.println("LoRa init failed. Check your connections.");
while (true); // if failed, do nothing
}
Serial.println("LoRa init succeeded.");
}
String dataR = "";
void loop() {
int packetSize = LoRa.parsePacket();
if(packetSize){
Serial.print("Dato Recibido");
Hi, I'm trying to use Arduino uno, ethernet shield w5100 and lora shield, I changed pins via setPins but I can´t get it work, everytime I run the code I get the same error Lora Init Failed. I changed jumper SV2, SV3, SV4 from right(default) to left according to this site information http://wiki.dragino.com/index.php?title=Lora_Shield. I also changed those lines referred to pins in file LoRa.h, but I hasn´t worked.
define LORA_DEFAULT_SS_PIN 10
define LORA_DEFAULT_RESET_PIN 9
`#include
include
define TX_PACKET_MAX_SIZE 9
define baud 9600
float lux = 0.f;
const int Lora_SS = 8; const int Lora_RST = 7; const int Lora_DIO0 = 2;
void setup() { pinMode(Lora_SS, OUTPUT); digitalWrite(Lora_SS, HIGH);
// override the default CS, reset, and IRQ pins (optional) LoRa.setPins(Lora_SS, Lora_RST, Lora_DIO0); // set CS, reset, IRQ pin
delay(200); Serial.begin(baud); // initialize serial while (!Serial);
if (!LoRa.begin(915E6)) { // initialize ratio at 915 MHz Serial.println("LoRa init failed. Check your connections."); while (true); // if failed, do nothing }
Serial.println("LoRa init succeeded."); }
String dataR = "";
void loop() { int packetSize = LoRa.parsePacket(); if(packetSize){ Serial.print("Dato Recibido");
// lux = dataR.toFloat(); Serial.println(); Serial.print("Lux "); Serial.println(dataR);
} }`