Using Library LoRa.h with Wemos D1 R2 for Lora Shield

I have been using Lora Shield for communication between servers and multiple sensors with arduino . But recently I must save data received to Cloud. So I choose Wemos D1 R2 that have a similar board with arduino . But when I upload an example code, LoraReceiver can't get data . Can Anyone Solved it ?

You need to tell the forum which library you are using and post the code you are using.

See the 'How to use this Forum - Please Read" post at the top of the forum for details.

And provide links to the hardware you are using 'LoRa Shield' could mean several different bits of hardware, dont assume the forum knows exactly the hardware you are using.

I am using library LoRa.h receiver for just testing that is worked or not with Lora Shield from dragino.

#include <SPI.h>
#include <LoRa.h>

void setup() {
Serial.begin(9600);
while (!Serial);

Serial.println("LoRa Receiver");

if (!LoRa.begin(915E6)) {
Serial.println("Starting LoRa failed!");
while (1);
}
}

void loop() {
// try to parse packet
int packetSize = LoRa.parsePacket();
if (packetSize) {
// received a packet
Serial.print("Received packet '");

// read packet
while (LoRa.available()) {
Serial.print((char)LoRa.read());
}

// print RSSI of packet
Serial.print("' with RSSI ");
Serial.println(LoRa.packetRssi());
}
}

Using Wemos D1 R2 that have a similar board to arduino uno

Hi,
Welcome to the forum.

Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html .
Then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.

Thanks.. Tom... :slight_smile: