Hi, I'm kinda new with this Arduino Pro Mini 3.3v and LoRa Ra-02 SX1278. I'm trying to do simple send and receive with this combination. I've been reading some post related to this on the forum, but i'm not sure i encountered a post related the problem i got.
The LoRa Ra-02 SX1278 frequency, I used is 433mhz
The Library i used is created by Sandeep Mistry GitHub - sandeepmistry/arduino-LoRa: An Arduino library for sending and receiving data using LoRa radios. · GitHub
Here's the code i used:
Transmitter
#include <SPI.h>
#include <LoRa.h>
const int csPin = 10; // LoRa NSS
const int resetPin = 9; // LoRa RST
const int irqPin = 2; // LoRa DIO0
int counter = 0;
void setup() {
Serial.begin(9600);
while (!Serial);
Serial.println("LoRa Sender");
LoRa.setPins(csPin, resetPin, irqPin);
if (!LoRa.begin(433E6)) {
Serial.println("Starting LoRa failed!");
while (1);
}
LoRa.setTxPower(20);
}
void loop() {
Serial.print("Sending packet: ");
Serial.println(counter);
LoRa.beginPacket();
LoRa.print("hello ");
LoRa.print(counter);
LoRa.endPacket();
counter++;
delay(5000);
}
Receiver:
#include <SPI.h>
#include <LoRa.h>
const int csPin = 10; // LoRa NSS
const int resetPin = 9; // LoRa RST
const int irqPin = 2; // LoRa DIO0
void setup() {
Serial.begin(9600);
while (!Serial);
Serial.println("LoRa Receiver");
LoRa.setPins(csPin, resetPin, irqPin);
if (!LoRa.begin(433E6)) {
Serial.println("Starting LoRa failed!");
while (1);
}
}
void loop() {
int packetSize = LoRa.parsePacket();
if (packetSize) {
Serial.print("Received packet '");
while (LoRa.available()) {
Serial.print((char)LoRa.read());
}
Serial.print("' with RSSI ");
Serial.println(LoRa.packetRssi());
}
}
Here is the Pin i followed for the Transmitter & Receiver :
| LoRa Ra-02 | Pro Mini 3.3V | |
|---|---|---|
| VCC | VCC / 3.3V | |
| GND | GND | |
| SCK | D13 | |
| MISO | D12 | |
| MOSI | D11 | |
| NSS/CS | D10 | |
| RST | D9 | |
| DIO0 | D2 |
Here is what it looks like the component, wiring & other stuff :
and here is the result in my serial monitor :
I don't know why the LoRa Ra-02 SX1278 won't act as a receiver. My first thought was that the LoRa act as a Receiver got broke, but when i try uploading the transmitter code it still function to transmit like the pic above, so i guess both of my LoRa didn't broken after all.
Both of my Arduino Pro Mini is 3.3v, so it should be fine to connect to LoRa Ra-02 SX1278.
Both of my LoRa Ra-02 SX1278 is connected with the 433mhz antenna, so it should be safe.
Now i'm confused where the problem is
Is anyone have any experience like this? where did i go wrong about my setup?
Please enlighten me ![]()







