Lora Module help

Im trying to make Wireless Weather Station i wanna make exactly this: https://howtomechatronics.com/tutorials/arduino/arduino-wireless-weather-station-project/

but without NRF24L01 Transceiver Module
i wanna use this RA-02 SX1278 433MHz LoRa modul

Can someone help me?
Im totaly lost in the coding and i need help.

Thanks

No problem, post whet you have written so far, and what part you are stuck on!

I only start with Transmitter Code of outdoor module and im not really sure if it works.

#include <SPI.h>
#include <LoRa.h>
#include <dht.h>
#include <LowPower.h> 
#define dataPin 8 // DHT22 data pin
dht DHT;
char thChar[32] = "";
String thString = "";
void setup() {
  Serial.begin(9600);

  
  while (!Serial);  
  Serial.println("LoRa Sender");
  if (!LoRa.begin(433E6)) { // or 915E6, the MHz speed of yout module
    Serial.println("Starting LoRa failed!");
    while (1);
  }
}
 
void loop() {
int readData = DHT.read22(dataPin); // Reads the data from the sensor
  int t = DHT.temperature; // Gets the values of the temperature
  int h = DHT.humidity; // Gets the values of the humidity
  thString = String(t) + String(h);
  thString.toCharArray(thChar, 12);
   
  LoRa.beginPacket();  
  LoRa.print(thChar);
  LoRa.endPacket();
 delay(50);
  // Sleep for 2 minutes, 15*8 = 120s
  for (int sleepCounter = 15; sleepCounter > 0; sleepCounter--)
  {
    LowPower.powerDown(SLEEP_8S, ADC_OFF, BOD_OFF);
  }
}

You will need a working LoRa receiver to be sure.

You need a receiver as well! Build both parts and come back if you can't get it working! Remember to post your code for both parts, your wiring, and a note of how you are powering the units.

Here is my complete project for send/receive via LoRa
Garage Door LoRa remove
may be more than you want/need

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.