In this guide you would need:
- COMMS Subsystem
- ESP-Prog interface
- LoRa receiver.
In this guide we will install a simple software usign Platform IO. We will send simple data over LoRa, and we will receive it in the ground segment. The code used in this example is uploaded here.
The steps are:
- Flash the software
- Get the received data from the LoRa Receiver board.
Please read first:
- 20240320 - COMMS - Workshop 1 - Flash the software
- 20240509 - Ground segment - Workshop 1 - LoRa Receiver
Flash software using Platform IO
First we need to dowload the code with its submodules:
git clone --recursive git@gitlab.com:insightsat/comms/com-lora-send-data-example.git
We will open the project using PlatformIO. After selecting the correct port, normally labeled as the second UART port, it is possible to upload the code.
#include <Arduino.h>
#include <LoRa.h>
uint8_t buff[] = "Hello World!\r\n";
void setup() {
Serial.println(115200);
if (!LoRa.begin(915E6)) {
Serial.println("Starting LoRa failed!");
while (1);
}
}
void loop() {
// send packet
LoRa.beginPacket();
LoRa.write(buff, sizeof(buff));
LoRa.endPacket();
Serial.println("Sending message");
delay(1000);
}
The software is continuosly sending the message “Hello World!” over LoRa. The next part is to receive the message using the LoRa Receiver board.
Receive the message with LoRa Receiver
With the LoRa Receiver board we can receive the messages on the UART port.
[~]$ tio /dev/tty.usbmodem143201
[21:49:08.479] tio v2.7
[21:49:08.480] Press ctrl-t q to quit
[21:49:08.481] Connected
Hello World!
Hello World!
Hello World!
The software that is running on the LoRa Receiver board is a LoRa to UART pipe. It can be found here.