im currently testing lora-based communication for a small project. my goal is to make them work so that i can advance to the next stage of my project. im using sx1278 ra-02 ai thinker connected to an Arduino nano. at first, i tried direct wiring. i know that move was risky and i wanna know if i can make this work now since the module initializes perfectly now that i am using 8channel logic level converter.
tx code
#include <LoRa.h>
// Pin definitions for Arduino Nano + TXS0108E + RA-02
#define LORA_SS 10
#define LORA_RST 2
#define LORA_DIO0 3
unsigned long counter = 0;
void setup() {
Serial.begin(9600);
while (!Serial);
Serial.println("LoRa Sender");
LoRa.setPins(LORA_SS, LORA_RST, LORA_DIO0);
// Initialize LoRa at 433 MHz
if (!LoRa.begin(433E6)) {
Serial.println("Starting LoRa failed!");
while (1);
}
// Lower bandwidth → more reliable on Nano
LoRa.setSignalBandwidth(125E3);
LoRa.setSpreadingFactor(9);
LoRa.setCodingRate4(5);
Serial.println("LoRa initialized successfully!");
}
void loop() {
Serial.print("Sending packet: ");
Serial.println(counter);
LoRa.beginPacket();
LoRa.print("Hello ");
LoRa.print(counter);
LoRa.endPacket();
counter++;
delay(5000);
}
rx code
#include <LoRa.h>
#define LORA_SS 10
#define LORA_RST 2
#define LORA_DIO0 3
void setup() {
Serial.begin(9600);
while (!Serial);
Serial.println("LoRa Receiver");
LoRa.setPins(LORA_SS, LORA_RST, LORA_DIO0);
if (!LoRa.begin(433E6)) {
Serial.println("Starting LoRa failed!");
while (1);
}
LoRa.setSignalBandwidth(125E3);
LoRa.setSpreadingFactor(9);
LoRa.setCodingRate4(5);
Serial.println("LoRa Receiver Ready");
}
void loop() {
int packetSize = LoRa.parsePacket();
if (packetSize) {
Serial.print("Received packet: ");
while (LoRa.available()) {
Serial.print((char)LoRa.read());
}
Serial.print(" RSSI: ");
Serial.println(LoRa.packetRssi());
}
}
what im suspecting is the length of my adapter and wires, i used 60cm long adapter to connect to whip antenna, 20cm wires for connection.
thank you for help


