Introduction

DFRobot FireBeetle series are low power consumption micro-controllers specially designed for Internet of Things (IoT), and mainly focusing on fast and convenient low-power building.

FireBeetle LoRa 868MHz wireless transmission module adopts a high-performance SX1276 LoRa 868MHz chip and with built-in PA (power amplifier) gain, compatible with Aruino. It supports long-range monitor and FSK modulation. The maximum transmission rate of the module can reach up to 300Kbps. The module also supports LoRaTM and can provide a maximum transmission of 37.5Kbps. The circuit current is even lower than 0.2uA in the sleep mode. It can be widely used in remote home automation detection, health monitoring, wearable device and so on.

warning_yellow.pngNOTE: All parameters related to wireless signals in the same network should maintain consistency to avoid communication problems.

Specification

Pinout

FireBeetle Covers-LoRa Radio 868MHz mainly communicates via SPI interface(MISO, MOSI, SCK, CS, RESET), and couples these control ports to the SPI interfece(MISO, MOSI, SCK) on the FireBettle mainboard. CS(chip-select) and RESET are connected to D2, D3, D4, D5 by DuPont wires.

Pinout

warning_yellow.pngNOTE: NC should not be connected, and VCC output as supply voltage(USB power supply: 5V, Lithium power supply: 3.7V)

Tutorial

Preparation

Generally, the default connection is CS to D4, RESET to D2. Of course you may revise program to change the default connection.(To transmit parameters through init funcion: init(uint8_t NSSPin = NSS_PIN, uint8_t NRESETPin = RESET_PIN)

Connection Diagram

Connection

Sample Code

Download FireBeele Covers-LoRa Radio 868MHz Library first. How to install library files?

/*!
 * @file receiverTest.ino
 * @brief DFRobot's received data
 * @n [Get the module here]
 * @n This example is receive.
 * @n [Connection and Diagram]
 *
 * @copyright    [DFRobot](http://www.dfrobot.com), 2016
 * @copyright    GNU Lesser General Public License
 *
 * @author [yangyang]
 * @version  V1.0
 * @date  2017-04-10
 */
#include <DFRobot_LoRa.h>

DFRobot_LoRa lora;

uint8_t len;
uint8_t rxBuf[32];

void setup()
{
    Serial.begin(115200);

    pinMode(LED_BUILTIN, OUTPUT);
    Serial.println("Receiver Test");
        //init(uint8_t NSSPin = NSS_PIN, uint8_t NRESETPin = RESET_PIN)
    if(!lora.init()) {
        Serial.println("Starting LoRa failed!");
        while (1);
    }

    lora.rxInit();    
}
void loop()
{
    if(lora.waitIrq()) {   // wait for RXDONE interrupt
        lora.clearIRQFlags();
        len = lora.receivePackage(rxBuf);  // receive data
        Serial.write(rxBuf, len);    
        Serial.println();
        lora.rxInit();    // wait for packet from master

        // print RSSI of packet
        Serial.print("with RSSI ");
        Serial.println(lora.readRSSI());

        static uint8_t i;
        i = ~i;
        digitalWrite(LED_BUILTIN, i);
    }
}
/*!
 * @file sendTest.ino
 * @brief DFRobot's send data
 * @n [Get the module here]
 * @n This example is send.
 * @n [Connection and Diagram]
 *
 * @copyright    [DFRobot](http://www.dfrobot.com), 2016
 * @copyright    GNU Lesser General Public License
 *
 * @author [yangyang]
 * @version  V1.0
 * @date  2017-04-10
 */

#include <DFRobot_LoRa.h>

DFRobot_LoRa lora;

uint8_t counter = 0;
uint8_t sendBuf[] = "HelloWorld!";

/* The default pin:
/        SS:D2
/        RST:D3
*/

void setup()
{
    Serial.begin(115200);
    //init(uint8_t NSSPin = NSS_PIN, uint8_t NRESETPin = RESET_PIN)
    if(!lora.init()) {
        Serial.println("Starting LoRa failed!");
        while (1);
    }
}
void loop()
{
    Serial.print("Sending packet: ");
    Serial.println(counter);

    // send packet
    lora.sendPackage(sendBuf, sizeof(sendBuf)); // sending data
    lora.idle();    // turn to standby mode

    counter++;
#if 0
    if(counter%10 == 0) {
        lora.sleep();
        delay (5000);// sleep 5 seconds
    }
#endif

    delay(500);
}

Result

Send

Receive

Dimension Diagram

Dimension Diagram

FAQ

Q&A Some general Arduino Problems/FAQ/Tips
A Please click the topic link on DFRobot Forum.
A For any questions, advice or cool ideas to share, please visit the DFRobot Forum.

More Documents

DFshopping_car1.png Get FireBeetle Covers-LoRa Radio 868MHz from DFRobot Store or DFRobot Distributor.

Turn to the Top