- Muchas notas - Fran Acién

20240527 - COMMS - Workshop 1 - Bring Up COMMS and LoRa Receiver

In this guide we are going to show the next things:

  • Test that the COMMS subsystem is working
  • Learn how to create a Platform IO Project
  • Send a LoRa message
  • Receive the LoRa message with the LoRa Receiver subsystem
  • Open Platform IO
  • Go to home of Plaform IO
  • Create a project, select the board Espressif ESP32-S3-DevKit, and select the Arduino framework
  • Change the source code to the next one:
#include <Arduino.h>

// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin LED_BUILTIN as an output.
  pinMode(36, OUTPUT);
  Serial.begin(9600);
}

// the loop function runs over and over again forever
void loop() {
  Serial.println("Hello world!");
  digitalWrite(36, HIGH);  // turn the LED on (HIGH is the voltage level)
  delay(1000);                      // wait for a second
  digitalWrite(36, LOW);   // turn the LED off by making the voltage LOW
  delay(1000);                      // wait for a second
}

646a330fc74dd36e95c5666c9525af20.png

  • Connect the ESP-Prog to the computer with a microUSB cable. You should be able to see the prototype system Power led high.

  • Program the software with Platform IO

  • Open your serial terminal and check that you are able to receive the “Hello world” message. You can do it using the screen command as:

$ screen /dev/tty.usbserial-143101 -b 9600

Dont forget that in order to close the connection you need to press Ctrl+A, and then press K.

Flash LoRa receiver software

  • Download the zip file with the code of the LoRa receiver software, called “LoRa-Receiver-Code”
  • Open it with Platform IO
  • Connect the LoRa Receiver PCB to your computer using a USB-C Cable.
  • Make sure you have selected the port correctly.
  • Program the software with Platform IO

Open the output of this board with screen:

$ screen /dev/tty.usbserial-143101 -b 9600

Flash a example code in the COMMS subsystem that sends a LoRa message

  • Download the zip file with the code of the COMMS example, called “Example-COM-Send-Lora”.
  • Open it with Platform IO
  • Connect the LoRa Receiver PCB to your computer using a USB-C Cable.
  • Make sure you have selected the port correctly.
  • Program the software with Platform IO

Open the output of this board with screen:

$ screen /dev/tty.usbserial-143101 -b 9600