Ok nice!
Yes I mean ESP Arduino Core.
I am using Arduino IDE 1.8.7. a Samsung Galaxy Edge S7, Blynk app 2.27.1.
You have seen the code I am using, did you notice something that might affect the performance negatively?
I think for example a library name changed in a previous version of Blynk like:
#include <BlynkSimpleEsp8266.h>
#include <ESP8266mDNS.h>
#include <WiFiUdp.h>
#include <ArduinoOTA.h>
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
long myWiFiTimeout = 5000;
long myServerTimeout =5000;
char ssid[] = "XXXX";
char pass[] = "XXXX";
// Blynk
char server[] = "blynk-cloud.com";
char auth[] = "XXXX";
void setup() {
// put your setup code here, to run once:
WiFi.mode(WIFI_STA);
WiFi.begin(ssid, pass);
ArduinoOTA.begin();
checkBlynk();
unsigned long startWiFi = millis();
while (WiFi.status() != WL_CONNECTED)
{
delay(500);
if(millis() > startWiFi + myWiFiTimeout)
{
break;
}
}
Blynk.config(auth, server);
}
void loop() {
// put your main code here, to run repeatedly:
ArduinoOTA.handle();
checkBlynk();
if (Blynk.connected())
{
Blynk.run();
}
}
void checkBlynk()
{
if (WiFi.status() == WL_CONNECTED)
{
unsigned long startConnecting = millis();
while(!Blynk.connected())
{
Blynk.connect();
if(millis() > startConnecting + myServerTimeout)
{
break;
}
}
}
}