Hello
I want to set up a Lora ra-01H module with an esp 32. I made the connections according to the figure below and programmed the following code on esp32. But the connection cannot be established and there is an error
Start LoRa init...
LoRa init failed. Check your connections.
is received
Note: The image below shows the connection of a lora ra-02 with an esp32. Because the pins of ra-01H are exactly the same as ra-02. I also made the connections in the same way.
#include <LoRa.h>
#include <SPI.h>
#define ss 5
#define rst 14
#define dio0 2
int counter = 0;
void setup()
{
Serial.begin(115200);
while (!Serial);
Serial.println("LoRa Sender");
LoRa.setPins(ss, rst, dio0); //setup LoRa transceiver module
while (!LoRa.begin(866E6)) //433E6 - Asia, 866E6 - Europe, 915E6 - North America
{
Serial.println(".");
delay(500);
}
LoRa.setSyncWord(0xA5);
Serial.println("LoRa Initializing OK!");
}
void loop()
{
Serial.print("Sending packet: ");
Serial.println(counter);
LoRa.beginPacket(); //Send LoRa packet to receiver
LoRa.print("hello ");
LoRa.print(counter);
LoRa.endPacket();
counter++;
delay(10000);
}