LoRa RX

dev board Arduino UNO
features LoRa RX SPI

Before starting

Dependancies

Ensure the following requirements are available:

Pre-requisites

Try these simpler examples:

Description

Receive hello from a LoRa point with 433 MHz. Use this with transmitting from a LoRa point.

Code

Download code
#include <SPI.h>
#include <LoRa.h>

void setup() {
  Serial.begin(9600);
  while (!Serial) {}

  Serial.println("LoRa Receiver");

  if (!LoRa.begin(433E6)) {
    Serial.println("Starting LoRa failed!");
    while (1) {}
  }
}

void loop() {
  int packetSize = LoRa.parsePacket();
  if (packetSize) {
    Serial.print("Received packet '");

    while (LoRa.available()) {
      Serial.print((char)LoRa.read());
    }

    Serial.print("' with RSSI ");
    Serial.println(LoRa.packetRssi());
  }
}

Makefile

BOARD?=arduino:avr:uno
PORT?=/dev/cu.usbmodem14201

.PHONY: default lint all flash clean

default: lint all flash clean

lint:
	cpplint --extensions=ino --filter=-legal/copyright,-readability/casting,-runtime/int *.ino

all:
	arduino-cli compile --fqbn $(BOARD) ./

flash:
	arduino-cli upload -p $(PORT) --fqbn $(BOARD) ./

clean:
	rm -f .*.hex
	rm -f .*.elf

Serial console

Serial output from the firmware.

LoRa RX serial console

Schematic

Wire up the hardware accordingly

LoRa RX schematic

Prototype

A photo of the actual setup.

LoRa RX prototype

References

Watch