Hello,
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 PIR sensor detects movement. When the sensor detecs movement
i dont receive any mail and just in this moment its said in the APP: you need to update the app. It’s outdated.
But I have the latest version :2.27.1
I dont now witch is the problem, or if is not able to send mails via bluetooht. Also my phone is connected to the internet.
Could you please help me.
#define BLYNK_PRINT Serial
/* Set this to a bigger number, to enable sending longer messages */
//#define BLYNK_MAX_SENDBYTES 128
#include <BlynkSimpleSerialBLE.h>
#include <SoftwareSerial.h>
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "e4086862bac840759921bc9f3c920353";
SoftwareSerial SerialBLE(10, 11); // RX, TX
void Alarma()
{
int Sensor = digitalRead(3);
if (Sensor == 1) // You can write any condition to trigger e-mail sending
{
Serial.println("Button is pressed."); // This can be seen in the Serial Monitor
Blynk.email("alex@gmail.com", "Subject: Button Logger", "You just pushed the button...");
}
}
void setup()
{
// Debug console
Serial.begin(9600);
SerialBLE.begin(9600);
Blynk.begin(SerialBLE, auth);
Serial.println("Waiting for connections...");
// Send e-mail when your hardware gets connected to Blynk Server
// Just put the recepient's "e-mail address", "Subject" and the "message body"
Blynk.email("alex@gmail.com", "Subject", "My Blynk project is online.");
pinMode(3, INPUT);
}
void loop()
{
Alarma();
Blynk.run();
}