...
In the previous example, you might have noticed a potential problem. The receiving device is getting LorRa messages from anyone sending data on that frequency. Furthermore, anyone can listen in to the data being sent. This could be resolved with some encryption, but that goes beyond the scope of this tutorialby encrypting the message.
We are going to solve the problem by simply sending an ID with our packet, then checking it at the receiving end and discarding any other messages.
We are using the Serial port extensively here to see the workings of our code, which is very slow for the arduinoArduino. It would be wise to remove most of this communication before using the an example in from the real world.
Sender Code with an Analog Sensor.
...