Friday, August 6, 2021

Lora Module Sx1278 (Ra-02) Interfacing With ESP8266 (NodeMCU)

Most people will be familiar with the esp8266 chip. In this article, I will teach you, Lora, to work with the esp8266. In this article, we will discus

Interfacing Lora With NodeMCU

Ra-02 Work With ESP8266 Board

Lora Ra-02

In this article, I will teach you how to use the LoRa Module with a Nodemcu board. In this project, we will send a two-way message between two LoRa.

First of all, Collect the following devices -
  • 2 Lora Ra-02 (Sx1278) Module 
  • 2 MT7681 Antenna
  • 2 NodeMCU (ESP8266)
  • Some Jumper Wires
  • 2 Dc 5 Volt Supply For NodeMCU Either USB Or Input Pin

Now make Connections According to the table given below -
Lora Ra-02 NodeMCU
GND (All Pins Compulsory)GND
Keep In Mind - 
    That you have to connect all GND pins of LoRa to GND of NodeMCU. If you leave even one of the pins open, your device will not work properly.

If you have looked at the datasheet of the Ra-02 model, you will find that the Ra-02 model only works between 410 - 525 MHz frequencies.
You will need to choose a frequency between these for this project. I am choosing 433 Mhz.

You have to install the LoRa library, you can download it from here and then add it to the Arduino software.

Now you have to upload the code given below in both the NodeMCU

Code -


You can Download Code Here

Note - 
The same code is to be uploaded on both devices.

If there is an error uploading the code, you remove nodemcu from LoRa and then upload the code and re-add LoRa after uploading.
You have selected 115200 baud rate for both serial monitors

Finally, after everything is successful, you need to open the serial monitor, if it says "Device Activated" it means all your system is working properly, now you can send and receive messages. If you see a "LoRa error" written on the serial monitor, you should thoroughly check your connections as well as the frequency recorded.

To send a message you have to go to any serial monitor, type the message in its input box, and press enter, your message will be sent to another LoRa module. and it will appear on the second serial monitor

Ankit jat

Author & Editor

I am working on new innovations, projects and ideas. which make our life easier and reliable. I like works that can take our current technology a step further.


  1. hello sir
    greeting of the day
    thanks for sharing this post.

    sir i was doing as you instructed but not able to get success in lora communication.

    sir i am using node mcu and sx276 dragino lora bee module. can you please guide me the actual working code for my lora transmitter and receiver.
    please mail me at

  2. Hello sir, can this project using both different board, example Arduino uno and Node mcu?

  3. One question, if we program 4 devices, will it reach all 4? How can we send to a specific device? mac direction?