Your Arduino went offline

Your title is Arduino went offline while you are using ESP… So what exactly are you have?

As said the App sends notification the Arduino goes offline.

When testing the sketch above it connects then for some reason gets buffer overflow I saw now with the print function.

And the LED-Widget NEVER EVER changed / blinked!

I cant copy the Serial Monitor output to show you. Any Idea on how to copy it?

Did some Screenshoots, maybe that helps

Ok, now the LED changed state once, then disconnect happened.

1 Like

What is your hardware? What is your wiring?

@gorkde you are using old Blynk libraries, try using the latest ones.

You seem to have numerous libraries for hardware you are probably not using.

Describe what hardware you are using and then use the relevant libraries shown in the examples e.g. Ethernet, ESP as shield, ESP standalone.

Ensure your project has the correct hardware setting.

I got a chinese Uno with CHG340 Serial Chip, that works very well in other sketches and I connected an esp8266 to external 3,3V Volt (voltage regulator) and RX/TX of the arduino (the Rx over voltage divider resistors)

Like in this post:

1 Like

ok found the reason!

Works now!

I had some cables at the ESP that I didnt use in this setup which probably were catching some radio.
I shortened them and now it works.

So back to my original Question can I set the led with Virtualwrite?
Or only this way?

in the other Thread you said:

3) You need either use WidgeLED or Blynk.virtualWrite(V18, 255); // HIGH. See http://docs.blynk.cc/#widgets-displays-led for more info;

But that doesnt work, just tested

void blinkLedWidget()
{
  if (led1.getValue()) {
    Blynk.virtualWrite(V18, 0);
    Serial.println("\nLED on V18: off");
  } else {
    Blynk.virtualWrite(V18, 255);
    Serial.println("\nLED on V18: on");
  }
}

ah ok, got it… the getvalue isnt from the app…

Solved my problem
Thanks for your help!

OMG!

Nothing changed now I get the buffer overflow again…

AT+CIPSEND=14
+vw 18 255
[80319] Buffer overflow
[80319] Buffer overflow
[80320] Buffer overflow
[80321] Buffer overflow
[80322] Buffer overflow
[80324] Buffer overflow
[80326] Buffer overflow
[80328] Buffer overflow
[80330] Buffer overflow
[80332] Buffer overflow

Ok, now found when disabling all serial communication I get Buffer overflow rarely.

As soon as I tahke Blynk.run() out of my sketch and just do virtualwrite it works flawlessly.
Even with LED on/off every 100ms!

Therefore it seems Blynk.run() is just transmitting data too fast for the ESP RX buffer (if I’m interpreting it right)

Is there any way to slow down Blynk.run() ?

You can switch all widgets to PUSH mode instead of “Frequency Reading” if you have some. Also what exactly code you are using now?

1 Like

Just working nearly flawlessly. Will also probably try reducing baud to 57600 tomorrow. Maybe that increases stability as well.

void blinkLedWidget()
{
  Blynk.virtualWrite(V18, 0);
  delay(500);
  Blynk.virtualWrite(V18, 255);
  delay(500);
}

void loop()
{
  //Blynk.run();
  //timer.run();
  blinkLedWidget();
}

Ok, reducing baud to 57600 seems to work even with blynk.run without disconnects

yeah, for some time…

Had those diconnects again an did further investigation.

It seems my ESP have an pretty old firmware that had a bug giving “busy p…” back before the OK.
I tried a Sketch to show the responses and had “busy p…” nearly all the time… I assume this is responsible for the overflow.

Then tried to update ESP Firmware but had no luck.

Will get other ESP soon and will try with them.

Feedback for other people…

added 470uF and 100nF directly at the ESP between + and GND and disabled all communication on serial Port.
Now 500ms blinking seelm to work (at least it did for 30 minutes without disconnect).

But as soon as I enable Blynk.run() it floods and disconnects.
Seems Blynk.run() is requesting data too quickly.

As said I assume thats also an issue with my module with old AT firmware and hope it works with other modules later.

Did ANYONE got ESP8266 with AT Firmware working flawlessly with blynk?

Did you look in our examples? You can’t do Blynk.virtualWrite in loop. This creates high load on microcontroller, especially ESP and makes it reboot. Recommended way is to use timer with required interval.

1 Like

The ESP isn’t rebooting and virtualwrite is rhe part that works.

What’s not working is the Blynk.Run() that crashes the connection instantly

Yes, As Blynk.run() makes all communication and handles virtualWrites

it wont work if it is COMMENTED OUT!