✨ Use RCAPP and get 5% off 👇
Skip to content
Free Delivery on Orders Above Rs 999/- Pan-India
Cash on Delivery Available for Orders above Rs.500/- and Upto Rs 3000/-
SAVE more when you BUY more. Upto 30% Off on BULK PURCHASE
GST Invoices for Your Business
Dedicated Technical Support Team
Safely Delivering Genuine Products PAN INDIA

Node to Node communication on LoRa with Arduino Nano and ESP32

Node to Node communication on LoRa with Arduino Nano and ESP32
D
Written By Daniel D'Souza
📅 Updated on 17 Jun 2026
Summarize with AI
✅ Prompt copied

What is LoRa?

LoRa, short for long-range, is the physical layer or the wireless modulation utilized to create a long-range communication link. LoRa is based on Chirp Spread Spectrum (CSS) modulation, which maintains the same low power characteristics as FSK modulation but significantly increases the communication range.

Material Required is as follows:

  1. Arduino Nano
  2. ESP32
  3. 2x LoRa Bee modules
  4. 4x 3.2K ohm Resistor
  5. 74LVC125A IC
  6. Jumper Wires

Components and Supplies

Arduino Nano R3 Dev Board – Small compatible Arduino Board with USB and ATmega328P for beginners and makers. -RobocrazeArduino Nano R3 Dev Board – Small compatible Arduino Board with USB and ATmega328P for beginners and makers. -Robocraze

    Arduino Nano R3 Development Board Compatible

    Arduino Nano R3 Development Board Compatible with Arduino The CH340 Soldered Arduino Nano Board R3 chipboard is based on the famous Arduino platform and does all the functions of Uno but with a smaller footprint, making it a best Arduino Nano board for electronics prototyping...
    Rs 200/-
    Rs 200/-
    Rs 299/-
    Save Rs 99/-
    🔥 Trending
    ESP32 NodeMCU (38-Pin) WiFi + BLE – Ideal for IoT. -Nodemcu ESP Board -RobocrazeESP32 NodeMCU (38-Pin) WiFi + BLE – Ideal for IoT. -Nodemcu ESP Board -Robocraze

      ESP32 (38 Pin) WiFi + Bluetooth NodeMCU-32 Development Board

      ESP32 (38 Pin) WiFi + Bluetooth NodeMCU Development Board The ESP32 (38 Pin) WiFi + Bluetooth NodeMCU Development Board is a powerful microcontroller designed for IoT, home automation, robotics, and embedded system development. Built around the ESP-WROOM-32 module, it combines a high-performance dual-core processor...
      Rs 381/-
      Rs 381/-
      Rs 599/-
      Save Rs 218/-
      DRAGINO LORA BEE V1.1 + HOPERF RFM95-98(W)-RobocrazeDRAGINO LORA BEE V1.1 + HOPERF RFM95-98(W)-Robocraze

      DRAGINO LORA BEE V1.1 + HOPERF RFM95-98(W)

      DRAGINO LORA BEE V1.1 + HOPERF RFM95-98(W)  The Dragino Lora BEE is a LoRa module that allows the user to send data and provides ultra-long range spread spectrum communication and high interference immunity whilst minimizing current consumption. The LoRa BEE targets professional wireless sensor network...
      Rs 2,189/-
      Rs 2,189/-
      Rs 2,780/-
      Save Rs 591/-

      Circuit Diagram

      circuit diagram of LoRa with Arduino Nano and ESP32

      circuit diagram of esp

      Pin Details

      ESP32

      LoRa BEE

      LoRa BEE

      physical pin

      ESP32 Pin

      MISO

        4

              D19(MISO)

       

      RESET

       5

              D14

      MOSI

      11

              D23(MOSI)

      D0  

       12

              D2

      NSS

       17

              D5

      SCK

       18

              D22(SCLK)

      3V3

        1

               3V3

      GND

       10

               GND

       Arduino Nano

      LoRa BEE

      LoRa BEE

      physical pin

      74LVC125A

      Arduino Nano

      MISO

        4

             12

       

             ----

      RESET

       5

             ----

             D10

      MOSI

      11

               3

             ----

      D0  

       12

            -----

             D2

      NSS

       17

               8

             ----

      SCK

       18

              6

             ----

      3V3

        1

            14

            ----

      GND

       10

             7

            ----

       

      Arduino Nano

      74LVC125A

      MISO

              11

      MOSI

               2

      NSS

               9

      SCK

               5

      3V3

              14

      GND

                7

       

      For node to node communication, the Nano will be configured as the Transmitter and the ESP32 will be configured as the receiver.

      Step 1: Installing ESP32 Add-on in Arduino IDE

      To install the ESP32 board in your Arduino IDE, follow below steps.

      1. In your Arduino IDE, go to File> Preferences.

      2. Enter https://dl.espressif.com/dl/package_esp32_index.json into the “Additional Board Manager URLs” field as shown in the figure below. Then, click the “OK” button.

        3. Go to Tools > Board > Boards Manager

           

          4. Search for “ESP32” and Click on the install button

            5. The installation may take a while depending on your network performance. Once done, close the board manager

               

              Step 2: Code and Library

              Download as Zip file of Arduino-LoRa Library refer below link.

              https://www.arduino.cc/reference/en/libraries/lora/

              Installing library

              1. In the Arduino IDE, navigate to Sketch > Include Library > Add .ZIP Library.

                 

                2. At the top of the drop-down list, select the option to "Add. ZIP Library''.

                  Step 3: Transmission Code

                  1. In your Arduino IDE, go to Tools > Board > Arduino Nano.

                    2. Type in the code below and click on the Upload button to upload the code in the Arduino IDE.

                     

                      #include <SPI.h>

                      #include <LoRa.h>

                      //define the pins used by the transceiver module

                      #define ss 10

                      #define rst 9

                      #define dio0 2

                       

                      int counter = 0;

                       

                      void setup() {

                        //initialize Serial Monitor

                        Serial.begin(115200);

                        while (!Serial);

                        Serial.println("LoRa Sender");

                       

                        //setup LoRa transceiver module

                        LoRa.setPins(ss, rst, dio0);

                       

                        //replace the LoRa.begin(---E-) argument with your location's frequency

                        //433E6 for Asia

                        //866E6 for Europe

                        //915E6 for North America

                        while (!LoRa.begin(866E6)) {

                          Serial.println(".");

                          delay(500);

                        }

                        // Change sync word (0xF3) to match the receiver

                        // The sync word assures you don't get LoRa messages from other LoRa transceivers

                        // ranges from 0-0xFF

                        LoRa.setSyncWord(0xF3);

                        Serial.println("LoRa Initializing OK!");

                      }

                       

                      void loop() {

                        Serial.print("Sending packet: ");

                        Serial.println(counter);

                       

                        //Send LoRa packet to the receiver

                        LoRa.beginPacket();

                        LoRa.print("hello ");

                        LoRa.print(counter);

                        LoRa.endPacket();

                       

                        counter++;

                       

                        delay(10000);

                      }

                       

                      3. After uploading code open Arduino serial monitor to observe the data being transmitted.

                         

                        Step 4: Receiver Code

                        1. In your Arduino IDE, go to Tools > Board > ESP32 Dev Module.

                        2. Type in the code below and click on the Upload button to upload the code in the Arduino IDE.


                          #include <SPI.h>

                          #include <LoRa.h>

                           

                          //define the pins used by the transceiver module

                          #define ss 5

                          #define rst 14

                          #define dio0 2

                           

                          void setup() {

                            //initialize Serial Monitor

                            Serial.begin(115200);

                            while (!Serial);

                            Serial.println("LoRa Receiver");

                           

                            //setup LoRa transceiver module

                            LoRa.setPins(ss, rst, dio0);

                           

                            //replace the LoRa.begin(---E-) argument with your location's frequency

                            //433E6 for Asia

                            //866E6 for Europe

                            //915E6 for North America

                            while (!LoRa.begin(866E6)) {

                              Serial.println(".");

                              delay(500);

                            }

                             // Change sync word (0xF3) to match the receiver

                            // The sync word assures you don't get LoRa messages from other LoRa transceivers

                            // ranges from 0-0xFF

                            LoRa.setSyncWord(0xF3);

                            Serial.println("LoRa Initializing OK!");

                          }

                           

                          void loop() {

                            // try to parse packet

                            int packetSize = LoRa.parsePacket();

                            if (packetSize) {

                              // received a packet

                              Serial.print("Received packet '");

                           

                              // read packet

                              while (LoRa.available()) {

                                String LoRaData = LoRa.readString();

                                Serial.print(LoRaData);

                              }

                           

                              // print RSSI of packet

                              Serial.print("' with RSSI ");

                              Serial.println(LoRa.packetRssi());

                            }

                          }

                          1. After uploading code open Arduino serial monitor to observe the data being received.
                          2.  

                            1. In receiver end, you can see the received packet

                             

                            Troubleshooting

                            After uploading   code if you are not receiving any packet into the receiver node follow the below steps

                            1. Make sure both node sender and receiver are  working the same

                              Frequency. You can check so, by making sure the below line is the same in both receiver and transmitter code

                              while (!LoRa.begin(866E6))

                              2. Make sure the baud rate is set to 115200 in the Serial monitor for both the devices

                              Excerpt

                              Check out step by step process for Node to Node communication on LoRa with Arduino Nano and ESP32
                              Prev Post
                              Next Post

                              Leave a comment

                              Please note, comments need to be approved before they are published.

                              Thanks for subscribing!

                              This email has been registered!

                              Shop the look

                              Choose Options

                              Edit Option
                              Back In Stock Notification
                              Compare
                              Product SKU Description Collection Availability Product Type Other Details

                              Choose Options

                              this is just a warning
                              Login
                              Shopping Cart
                              0 items
                              FREE SHIPPING!
                              ₹100 OFF
                              ₹200 OFF
                              ₹999
                              ₹2500
                              ₹4900
                              WhatsApp Chat Chat