-1

I have an Esp32-E from Firebeetle and LoRa from SBComponents. On both of these devices there are RX and TX pins. I believe that LoRa pins are just an extension of pins found on the Firebeetle.

My problem is that I don't know how to direct data into these pins for theLoRa module to send them. I'm using Arduino IDE for coding.

Thanks in advance for any and all help.

1
  • I believe it's one of those UART modules, with an MCU between the LoRa chip and the main MCU. You're going to need 2 things: A UART connection Rx-->Tx, Tx-->Rx, and the AT firmware or similar commands to send and receive data. You'd have been better off buying the Firebeetle LoRa extension. Commented Sep 18, 2024 at 18:33

1 Answer 1

0

You can try this connection: LoRa MISO → ESP32 MISO (usually GPIO 19 on the ESP32) LoRa MOSI → ESP32 MOSI (usually GPIO 23 on the ESP32) LoRa SCK → ESP32 SCK (usually GPIO 18 on the ESP32) LoRa CS → ESP32 GPIO5 (you can select any GPIO) LoRa RST → ESP32 GPIO14 (or any GPIO) LoRa DIO0 → ESP32 GPIO26 (or any GPIO) Then try this code:

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

void setup() {
  // Start Serial Monitor
  Serial.begin(9600);
  
  // Initialize LoRa module
  LoRa.setPins(5, 14, 26);  // CS, RST, DIO0 pins
  if (!LoRa.begin(915E6)) { // 915 MHz frequency for LoRa
    Serial.println("Starting LoRa failed!");
    while (1);
  }
}

void loop() {
  Serial.println("Sending packet...");
  
  // Start packet
  LoRa.beginPacket();
  LoRa.print("Hello, LoRa!");
  LoRa.endPacket();
  
  delay(1000);
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.