Hello:
I try to send a mail when de PIR sensor is activated. But wen I charge the program starts to send emails and doesnt stop.I dont now how can i solve this.
#include <ESP8266_Lib.h>
#include <BlynkSimpleShieldEsp8266.h>
char auth[] = "3859c00afb3b4ddeabeac179be498541";
char ssid[] = "WIFI ";
char pass[] = "946255638";
#include <SoftwareSerial.h>
SoftwareSerial EspSerial(10, 11); // RX, TX
// Your ESP8266 baud rate:
#define ESP8266_BAUD 9600
ESP8266 wifi(&EspSerial);
void setup()
{
// Debug console
Serial.begin(9600);
// Set ESP8266 baud rate
EspSerial.begin(ESP8266_BAUD);
delay(10);
Blynk.begin(auth, wifi, ssid, pass);
// You can also specify server:
//Blynk.begin(auth, wifi, ssid, pass, "blynk-cloud.com", 80);
//Blynk.begin(auth, wifi, ssid, pass, IPAddress(192,168,1,100), 8080);
pinMode(A0, INPUT);
}
void loop()
{
Blynk.run();
int value= digitalRead(A0);
if(value == HIGH)
{
Blynk.email("your_email@mail.com", "Subject: Button Logger", "You just pushed the button...");
}
}