hello friends, here the speaker is the direct friend of Brazil.
I need a help I got it with the help of you to configure the hc-05 together with the SW-420, now I would like it to show the SW data on the LCD reader, I will make my code available to see if there are errors and if I am on the right path , I thank you and apologize for my English
#define BLYNK_PRINT Serial
#include <SoftwareSerial.h>
SoftwareSerial SwSerial(10, 11); // RX, TX
#include <BlynkSimpleSerialBLE.h>
char auth[] = "..........";
SoftwareSerial SerialBLE(10, 11);
//==============================Token de autorizacao
BlynkTimer timer;
int vs =9; // sensor de vibração / vibration sensor
int aviso;
void enviaraviso()
{
vs = digitalRead (9);
Blynk.virtualWrite(V0, vs);
}
void setup(){
pinMode(vs, INPUT);
Serial.begin(9600);
SerialBLE.begin(9600);
Blynk.begin(SerialBLE, auth);
Serial.println("Waiting for connections...");
timer.setInterval(1000L, enviaraviso);
}
void loop(){
long measurement = vibration();
delay(50);
Serial.println(measurement);
if (measurement > 12000){
Blynk.virtualWrite(V1, aviso);
}
Blynk.run();
timer.run();
}
long vibration(){
long measurement=pulseIn (vs, HIGH);
return measurement;
}