Hello, I am having a weird issue when uploading a new code I have to include the sensor library or it will other not connect at all and just keep saying connecting to IP or will take 20 seconds to respond. I have 10 other devices connect to the same local server and they all work fine with no delay. I have tried to update server, Arduino ide and the app with no change would anyone have any idea how to solve this
#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h> // for ESP8266
#include <BlynkSimpleEsp8266.h> // for ESP8266'
#include <DallasTemperature.h>
#include <OneWire.h>
#define ONE_WIRE_BUS D9
OneWire oneWire(ONE_WIRE_BUS);
DallasTemperature sensors(&oneWire);
char auth[] = "XXXXX";
char ssid[] = "XXXXX";
char pass[] = "XXXXX";
// Set your LED and physical button pins here
const int ledPin1 = D2;
BlynkTimer timer;
BLYNK_WRITE(V1) {
int onoff = param.asInt();
if (onoff == 1)
{
Blynk.virtualWrite(V10, 1023);
digitalWrite(ledPin1, 0);
} else {
Blynk.virtualWrite(V10, 0);
digitalWrite(ledPin1, 1);
}
}
void setup()
{
Serial.begin(9600); // BLYNK_PRINT data
Blynk.begin(auth, ssid, pass, IPAddress(192,168,0,19), 8080);
sensors.begin();
pinMode(ledPin1, OUTPUT);
}
void loop()
{
Blynk.run();
timer.run(); // Run SimpleTimer
}
Hello, @Gunner here is a screenshot of serial monitor with blynk debug on there is a 10 second delay when led turns on or off then after the second connect it just keeps trying to connect. but if I add the sensor library there is no dealy and doesn’t disconnect and I have checked my router and still have heaps of IP’s available. I only have esp8266 but have tried multiple boards and different pc running with the same outcome.
So I have now tried 3 different computers running different versions of Arduino and tried to use blynk server instead of my local server with the same problem without OneWire & DallasTemperature library it will not connect as seen in the first photo but if I add OneWire & DallasTemperature library it connects fine as seen in the second photo
Please DON’T USE 2.5.0 because it has problems. Use the git master version ( if you have the required skills ) or wait a bit more to get the 2.5.1 that it is not far from released.
Hmm does this also affect the cloud server connected devices?
This morning two of my ESP8288 (Wemos D1 mini) devices are not connecting, but my other ones are. The two in question were re-flashed within the last few days, the working ones were not.
Downgraded to 2.4.2
Arduino IDE > Tools > Board > Board Manager > (search for ESP8266)
That is exactly what was happening to me on local and cloud server and after downgrading it fixed the problem immediately and havent seen any problems with local or cloud since so i would give it a shot