Go Down

Topic: Lora RA 02 module doesn't send message continuously (Read 73 times) previous topic - next topic

Turkone


I am using Arduino Uno, SX1278 LoRa Ra02 433MHz module and 433MHz antennas to send message to a receiver which has the same hardware. Sender is sending just one packet then stops(receiver takes the only message in good RSSI).What kind of loop or code can use to make sender to send continuously?.Here Sender Code is:
Code: [Select]
 
#include <SPI.h>
#include <LoRa.h>

int counter = 0;

void setup() {
  Serial.begin(9600);
  while (!Serial);

  Serial.println("LoRa Sender");

  if (!LoRa.begin(433E6)) {
    Serial.println("Starting LoRa failed!");
    while (1);
  }
}

void loop() {
  Serial.print("Sending packet: ");
  Serial.println(counter);

  // send packet
  LoRa.beginPacket();
  LoRa.print("hello ");
  LoRa.print(counter);
  LoRa.endPacket();

  counter++;

  delay(1000);
}     

srnet

How do you know its not sending continuously ?


Might be an idea to change the power from the default of 17dBm to 10dBm, which is often the limit for licence excempt use;

LoRa.setTxPower(10);
http://www.50dollarsat.info/
http://www.loratracker.uk/

Go Up