Home Project guides LoRa Mesh Network Node
Beginner

LoRa Mesh Network Node

Estimated cost $25-35 · 3 parts

Bill of materials

Heltec LoRa 32 V3 (or LILYGO T-Beam)
18650 Battery
915MHz antenna (or 868MHz for EU)

Source code

main.py / main.ino
// PlatformIO - Custom LoRa mesh
#include <heltec.h>
#include <RadioLib.h>

SX1262 radio = new Module(SS, DIO1, RST, BUSY);

struct Packet {
    uint32_t node_id;
    float lat, lon;
    uint8_t battery;
    uint8_t hop_count;
};

void setup() {
    Heltec.begin(true, true, true, true, 915E6);
    
    radio.begin(915.0, 125.0, 10, 5, 0x12, 22);
    radio.setDio1Action(onReceive);
    radio.startReceive();
}

void onReceive() {
    Packet pkt;
    radio.readData((uint8_t*)&pkt, sizeof(pkt));
    
    if (pkt.hop_count < 3) {
        pkt.hop_count++;
        radio.transmit((uint8_t*)&pkt, sizeof(pkt));
    }
    
    // Display on OLED
    Heltec.display->clear();
    Heltec.display->drawString(0, 0, String(pkt.node_id));
    Heltec.display->display();
}

Build notes

Option 1: Use Meshtastic firmware (recommended) - Flash via web: https://flasher.meshtastic.org - Configure via app - Automatic mesh networking Option 2: Custom firmware for DENDAT integration