Thanks for taking the time to share your expertise with me. It's very much appreciated. I don't know where I picked up the (mis) information regarding the capabilities of Ra-02. I am currently using them on two of my projects, but had I known I could network them, it would have made life so much easier.
As I mentioned, I am currently monitoring the water level in four tanks, but I only have one sensor that is "shared" between them.
As per your question of how much data and the time line. The maximum distance I'm monitoring is 200cm or 72 inches. Therefore I figure three significant figures for each transmitter. The receiver would have to handle the four streams. As I'm monitoring water levels and not car speeds, I would think if they transmitted once a minute, that would be sufficient.
I haven't seen examples of how to set frequencies or channels on the Ra-02 so the transmitters don't talk over each other.
Here is the code of the transmitter side. It's working fine. In case your curious, the relay is to shut the water off if the water level drops below a predetermined level.
Again thanks for any help or advixe.
Jeff
//RELAY WORKS DISPLAY WORKS Jan20,2021
// ask_transmitter.pde
// -*- mode: C++ -*-
// Simple example of how to use RadioHead to transmit messages
// with a simple ASK transmitter in a very simple way.
// Implements a simplex (one-way) transmitter with an TX-C1 module
#include<LoRa.h>
//#include <SPI.h> // Not actually used but needed to compile
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#define OLED_RESET 4
Adafruit_SSD1306 display(OLED_RESET);
#include <Ultrasonic.h>
#define TRIGGER_PIN 7 // Arduino pin tied to trigger pin on the ultrasonic sensor.
#define ECHO_PIN 8 // Arduino pin tied to echo pin on the ultrasonic sensor.
#define MAX_DISTANCE 200 // Maximum distance we want to ping for (in centimeters). Maximum sensor distance is rated at 400-500cm.
int LEDPin=5; //Relay and LED pin
Ultrasonic ultrasonic(7,8); //Ultrasonic ultrasonic(Trig,Echo);
void setup()
{
Serial.begin(9600);
display.begin(SSD1306_SWITCHCAPVCC, 0x3c); //initialize with the I2C addr 0x3C (128x64)
display.clearDisplay();
while (!Serial);
pinMode(LEDPin, OUTPUT);
Serial.println("LoRa Receiver");
if (!LoRa.begin(433E6))
{
// Serial.println("Starting LoRa failed!");
while (1);
// LoRa.setTxPower(20);
}
LoRa.setSpreadingFactor(10);
LoRa.setSignalBandwidth(62.5E3);
LoRa.crc();
}
void loop()
{
delay(100);
display.clearDisplay();
display.setTextSize(2);
display.setTextColor(WHITE);
display.setCursor(0,0);
display.println("Tank Depth");
display.setTextColor(BLACK, WHITE);
display.setTextSize(2);
display.setTextColor(WHITE);
display.setCursor(00,20);
display.println("Down");
display.setTextSize(2);
display.println(ultrasonic.Ranging(INC) );
display.println(" inches");
display.display();
delay(800);
display.clearDisplay();
if (ultrasonic.Ranging(INC) >=28 ) //ALARM
{
digitalWrite(LEDPin,HIGH); //ALARM
}
else {
digitalWrite(LEDPin,LOW); // play tone of 400Hz for 500 ms
}
// Wait 50ms between pings (about 20 pings/sec). 29ms should be the shortest delay between pings.
// Serial.print("Distance is: ");
Ultrasonic ultrasonic(7,8); //Ultrasonic ultrasonic(Trig,Echo);
//Serial.print(ultrasonic.Ranging(INC));
// Serial.println(" inches");
LoRa.beginPacket(); ///send packet
LoRa.print(ultrasonic.Ranging(INC));
LoRa.endPacket();
delay(800);
}