BLYNK
HOME       📲 GETTING STARTED       📗 DOCS       ❓HELP CENTER       👉 SKETCH BUILDER

Help with Displaying Vibration Measurements on Blynk App using the Grove LoRa Radio - 433 MHz Transmitter and Receiver - URGENT

Hello, I’m working on an Arduino Uno Project.
I wanted to know, how I can send the readings/measurements of a Grove Vibration Sensor (SW-420) fitted on one of my Arduinos (Arduino Uno Rev3 USB), using (or through) the Grove LoRa Radio (433 MHz) Transmitter (fitted on the same Arduino), to the Grove LoRa Radio (433 MHz) Receiver that is fitted on the second (separate) Arduino (USB). And then, I want to display the data (or the vibration measurement) coming to the LoRa Radio Receiver (connected to the second Arduino) Serial Monitor, on the Blynk App. I need the sketch for Arduino IDE
This is very important for me and is very urgent, cause I want to finalise my project and submit. Kindly guide me …
It’s a heartily request… Please… As soon as possible.

@TreeBoy I’ve removed your identical posts from a number of other topics and moved this post to its own topic.
Please do not spam the forum in this way again, otherwise your account will be deleted.

This forum is not a code factory, especially for students who haven’t bothered to do their assignments, so I doubt very much of your request will produce the result you are hoping for.

Pete.

1 Like

Oh… I’m so sorry sir. I didn’t thought of that.
I extremely apologize.
But this is an urgent query regarding help for a Blynk project using LoRa Radio. I forgot to mention that this, I’m modifying a small IoT project I made a year ago. I’m just asking for help. This is not included in any competition or project submission. I hope you’ll understand sir, and guide me, cause I want to innovate.

In that case, you’d be better-off sharing what you have so far (and post your code with the correct triple backticks (```) at the beginning and end) and explain in detail the hardware you are using, the purpose of the project, what issues you are struggling with and any additional information that may be of help to any forum member who is inclined to help you.

Pete.

Hmm the story changes :thinking:

This is my Arduino Transmitter Sketch (with Radio Transmitter):

#include <SoftwareSerial.h>
#include <RH_RF95.h>
int EP = 2;


// Singleton instance of the radio driver
SoftwareSerial ss(5, 6);
RH_RF95 rf95(ss);


void setup() 
{
  pinMode(EP, INPUT); //set EP input for measurment
  Serial.begin(115200); //init serial 115200
  Serial.println("----------------------Sender / Transmitter------------------------");

  if (!rf95.init())
    {
        Serial.println("init failed");
        while(1);
    }

  rf95.setFrequency(434.0);
}

void loop() 
{
  long measurement = TP_init();
  delay(10);
  Serial.print("measurment = ");
  Serial.println(measurement);
    if (measurement > 50) 
    {
      delay(200);
      // Send a message to rf95_server
    uint8_t data[200] = {0};
    sprintf(data,"measurement is %d\r\n", measurement);
    rf95.send(data, sizeof(data));
   delay(6000);
   
    rf95.waitPacketSent();
  }
  // Now wait for a reply
    uint8_t buf[RH_RF95_MAX_MESSAGE_LEN];
    uint8_t len = sizeof(buf);

    if(rf95.waitAvailableTimeout(3000))
    {
        // Should be a reply message for us now   
        if(rf95.recv(buf, &len))
        {
            Serial.print("got reply: ");
            Serial.println((char*)buf);
        }
        else
        {
          digitalWrite(ss, LOW);
        }
}
}

long TP_init() {
  delay(10);
  long measurement = pulseIn (EP, HIGH); //waits for the pin to get HIGH and returns measurement
  return measurement;
} 

And here is my Arduino Receiver Sketch (with Radio Receiver):

#include <SoftwareSerial.h>
#include <RH_RF95.h>

// Singleton instance of the radio driver
SoftwareSerial ss(5, 6);
RH_RF95 rf95(ss);

int ledPin = LED_BUILTIN;
int buzzer = 3;

void setup() 
{
  pinMode(ledPin, OUTPUT);
  pinMode(buzzer, OUTPUT);
  Serial.begin(115200); //init serial 115200
    
    if(!rf95.init())
    {
        Serial.println("init failed");
        while(1);
    } 
    
    rf95.setFrequency(434.0);
}

void loop() 
{
  long measurement = TP_init();
  delay(10);
  Serial.print("measurment = ");
  Serial.println(measurement);
  if(rf95.available()) 
  {
    delay(200);
    // Should be a message for us now   
    uint8_t data[200] = {0};
    uint8_t len = sizeof(data);
    
    if(rf95.recv(data, &len)) 
    {
      Serial.print("GOT VIBRATION: ");
        Serial.println((char*)data);
       
        digitalWrite(ledPin, HIGH);
        tone(buzzer, 1200); // Send 1KHz sound signal...
        delay(250);        // ...for 1 sec
        digitalWrite(ledPin, LOW);
        noTone(buzzer);     // Stop sound...
        delay(250);        // ...for 1sec
        digitalWrite(ledPin, HIGH);
        tone(buzzer, 1200); // Send 1KHz sound signal...
        delay(250);        // ...for 1 sec
        digitalWrite(ledPin, LOW);
        noTone(buzzer);     // Stop sound...
        delay(250);        // ...for 1sec
        digitalWrite(ledPin, HIGH);
        tone(buzzer, 1200); // Send 1KHz sound signal...
        delay(250);        // ...for 1 sec
        digitalWrite(ledPin, LOW);
        noTone(buzzer);     // Stop sound...
        delay(250);        // ...for 1sec
        tone(buzzer, 1200); // Send 1KHz sound signal...
        digitalWrite(ledPin, HIGH);
        delay(250);        // ...for 1 sec
        digitalWrite(ledPin, LOW);
        noTone(buzzer);     // Stop sound...
        delay(250);        // ...for 1sec
        digitalWrite(ledPin, HIGH);
        tone(buzzer, 1200); // Send 1KHz sound signal...
        delay(250);        // ...for 1 sec
        digitalWrite(ledPin, LOW);
        noTone(buzzer);     // Stop sound...
        delay(250);        // ...for 1sec
        digitalWrite(ledPin, HIGH);
        tone(buzzer, 1200); // Send 1KHz sound signal...
        delay(250);        // ...for 1 sec
        digitalWrite(ledPin, LOW);
        noTone(buzzer);     // Stop sound...
        delay(250);        // ...for 1sec
        digitalWrite(ledPin, HIGH);
        tone(buzzer, 1200); // Send 1KHz sound signal...
        delay(250);        // ...for 1 sec
        digitalWrite(ledPin, LOW);
        noTone(buzzer);     // Stop sound...
        delay(250);        // ...for 1sec
        digitalWrite(ledPin, HIGH);
        tone(buzzer, 1200); // Send 1KHz sound signal...
        delay(250);        // ...for 1 sec
        digitalWrite(ledPin, LOW);
        noTone(buzzer);     // Stop sound...
        delay(250);        // ...for 1sec
        digitalWrite(ledPin, HIGH);
        tone(buzzer, 1200); // Send 1KHz sound signal...
        delay(250);        // ...for 1 sec
        digitalWrite(ledPin, LOW);
        noTone(buzzer);     // Stop sound...
        delay(250);        // ...for 1sec
        
    // Send a reply
        uint8_t data[] = "Thanks for the Data";
        rf95.send(data, sizeof(data));
        rf95.waitPacketSent();
        Serial.println("Sent a reply");

        digitalWrite(ledPin, LOW);
        digitalWrite(buzzer, LOW);
    }
    else
    {
        Serial.println("recv failed");
    }
    delay(6000);
    }
}

long TP_init() {
  delay(10);
  long measurement = pulseIn (ss, HIGH); //wait for the pin to get HIGH and returns measurement
  return measurement;
}

Kindly guide me within today… It’s very urgent…
Please, friends and teachers…

Hmm, this was URGENT three months ago, then you hibernated for the winter and you seem to have woken up and realised that your deadline for submitting this is tomorrow.

Try googling the Seven P’s, it’s a good adage for life.

Pete.

Sir, as I told before, this isn’t a project or competition-based work.
I have to show it to some person, who’s interested to know about and see my idea. He’s continuously forcing and pinching me.
I’m an aspiring innovator, please try to help me regarding this. I’ve many expectations from the Blynk Community regarding help and guidance.
Please sir…
And anyone, your contribution and guidance would be highly appreciated. That’s my heartiest request.