Hello I am using rfm95w lora module, everything is as I want, no problem, but I want the receiver to control it when the transmitter connection is disconnected. I want it to run a function when disconnected or lost connection. I tried this with while and if but it didn't work.
i tried
while (!LoRa.available())
{
//function
}
////////////////////////////////////////////
if (!LoRa.available())
{
//function
}
There is no permanent 'connection' between transmitter and receiver.
The receiver can work out that the transmitter is offline or otherwise not transmitting if you write code whereby the receiver reports an issue if it does not receive a packet every x seconds.
Or the receiver transmits a packet to the transmitter on a regular basis and expect an acknowledge within say x attempts, no acknowledge then the receiver assumes the transmitter is off line.