Hello,
I am very new to Blynk. I am using an HC-05 with an Arduino UNO. I am able to turn a led on and off via Bluetooth from the app. I want to send an email to my gmail when the out put of a certain function is 1. I have followed the sketch, but it is not sending anything. Could you please help me.
this is my sketch:
#include <ADXL335ACC.h>
ADXL335ACC accelerometer ;
/* Set this to a bigger number, to enable sending longer messages */
//#define BLYNK_MAX_SENDBYTES 128
#include <SoftwareSerial.h>
SoftwareSerial SwSerial(10, 11); // RX, TX
#include <BlynkSimpleSerialBLE.h>
#include <SoftwareSerial.h>
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "92e9e80812e7495ead72da9315b1e5d7";
SoftwareSerial SerialBLE(10, 11); // RX, TX
unsigned count = 0;
int i=0;
void setup() {
// Debug console
Serial.begin(9600);
SerialBLE.begin(9600);
Blynk.begin(SerialBLE, auth);
Serial.println("Waiting for connections...");
accelerometer.Begin();
}
void loop() {
Blynk.run();
if (accelerometer.IsFreeFall() == 1){
Blynk.email("subject :Fall detected ", "your randma/grandpa has fallen"); }
}
Notification group of widgets would not work on Bluetooth/BLE connection in almost all cases, as it means that the hardware is not connected to the Internet, so email, push notifications, twitter widgets would not work in such environment. On several latest versions of Android app it could work, but only in the case of persistent Bluetooth/BLE connection between smartphone and hardware.
Thanks for the help. apparently now that I did some modifications, it is trying to send the email but, it is saying. you need to update the app. It’s outdated.
#include <Blynk.h>
#include <SoftwareSerial.h>
#include <BlynkSimpleSerialBLE.h>
#include <SoftwareSerial.h>
#include <ADXL335ACC.h>
ADXL335ACC accelerometer ;
BlynkTimer Timer; // Announcing the timer
#define BLYNK_MAX_SENDBYTES 128
#define BLYNK_USE_DIRECT_CONNECT
char auth[] = "92e9e80812e7495ead72da9315b1e5d7";
SoftwareSerial SerialBLE(10, 11); // RX, TX
void CheckIsFreeFall()
{
if (accelerometer.IsFreeFall() == 1){
Blynk.email("subject :Fall detected ", "your randma/grandpa has fallen"); }
}
void setup() {
// Debug console
Serial.begin(9600);
SerialBLE.begin(9600);
Blynk.begin(SerialBLE, auth);
Timer.setInterval(250L, CheckIsFreeFall); //timer will run every sec
Blynk.email("idir.mahrouche@gmail.com", "subject :Fall detected ", "your randma/grandpa has fallen");
Blynk.notify("ESP8266 Alert - Temperature over 28C!");
accelerometer.Begin();
}
void loop() {
Blynk.run(); // run Blynk magic
Timer.run(); // run timer every second
}
App’s version? If the 2.27.0 - join the beta and download 2.27.1 - reproduce your issue with this error, and open Blynk app’s About screen, select ‘Send logs’ option on it - send email with the log file to alex@blynk.cc