I’m using iphone 5s. I connect esp8266 module to arduino mega board as exactly on blynk tutorial and used sample code “LED Blink” in Blynk example browser. but when i run it, everything fine untill esp8266 connect to my personel hotspot. after that " Buffer overflow " appeared in serial monitor my phone indicated that device is offline. But everythink work fine in android devices.
/*************************************************************
Download latest Blynk library here:
Blynk is a platform with iOS and Android apps to control
Arduino, Raspberry Pi and the likes over the Internet.
You can easily build graphic interfaces for all your
projects by simply dragging and dropping widgets.
Blynk library is licensed under MIT license
This example code is in public domain.
*************************************************************
WARNING!
It's very tricky to get it working. Please read this article:
Blynk using a LED widget on your phone!
App project setup:
LED widget on V1
*************************************************************/
/* Comment this out to disable prints and save space */
#define BLYNK_PRINT Serial
#include <ESP8266_Lib.h>
#include <BlynkSimpleShieldEsp8266.h>
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "04ff75de571e4a11832fe65c9a98f195"/*"cffec781a9754881835c45beb9429996"*/;
// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "Emperor_Rukz"/*"J7 Pro"*/;
char pass[] = "sachin27290"/*"12345678"*/;
// Hardware Serial on Mega, Leonardo, Micro...
#define EspSerial Serial1
// or Software Serial on Uno, Nano...
//#include <SoftwareSerial.h>
//SoftwareSerial EspSerial(2, 3); // RX, TX
// Your ESP8266 baud rate:
#define ESP8266_BAUD 115200
ESP8266 wifi(&EspSerial);
WidgetLED led1(V1);
BlynkTimer timer;
// V1 LED Widget is blinking
void blinkLedWidget()
{
if (led1.getValue()) {
led1.off();
Serial.println("LED on V1: off");
} else {
led1.on();
Serial.println("LED on V1: on");
}
}
void setup()
{
// Debug console
Serial.begin(9600);
// Set ESP8266 baud rate
EspSerial.begin(ESP8266_BAUD);
delay(10);
Blynk.begin(auth, wifi, ssid, pass);
timer.setInterval(1000L, blinkLedWidget);
}
void loop()
{
Blynk.run();
timer.run();
}