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:
#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);
}