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.
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.
Dimitriy I know. After looking into for so long I now understand what Blynk.run() does.
But as soon as I request data from ESP faster than every 500ms it overflows the buffer as I wrote before. And I suppose the Blynk.Run() does so!
Avoiding Blink.run() works for testing but I can’t in my final project since requesting data of 32 VP every lets say 800ms would take more than 20sec before the App is updated. That would be too long.
As said I suppose it’s a problem with my ESP module Firmware but I’m not sure.
Therefore it would be really essessential for me to know if some other people got any ESP8266 Module with AT Firmware working flawlessly.
@Gorkde I think you might be confused on what Blynk.run() does in relation to virtual pin updates.
I NEVER use anything other than PUSH frequencies but based on your example of 800ms it wouldn’t take 20seconds to update 32 pins.
Blynk has a maximum of 1000 updates per second so if all 32 pins were set at 800ms refresh they would all refresh in the blink of an eye, every 800ms.
Have you upgraded from 0.3.4 to 0.3.7 yet?
With your last code extract your hardware is asleep for almost all the time i.e. in loop you have the call to flash the LED with 500ms delays. You really MUST use the SimpleTimer for these intervals so your hardware doesn’t go to sleep and disconnect from the Blynk server. That said flood error is a different issue which suggests other bugs in your code.
From my experience Arduinos with ESP’s is a poor hardware system unless you just want to do very basic stuff.
Thanks Costas.
(and dave, please shut up if you didn’t even read the thread or understand the problem)
So when I call blynk.run() it - if I understand it correctly - calls all the functions for pushing data right? This would mean an AT command for every pin Blynk.run requests (or are they pulled in one dataset?).
Since it calls them (I suppose) one after another without pause (I suppose) there would be more than 1 AT command in 500ms which would cause buffer overflow.
But even without any of these functions defined as soon as I call Blynk.run I get buffer overflow after some few seconds.
The 500ms delay combined with virtualwrite is just for testing purposes and works.
Will look for the update later when at home.
I had to use an Arduino since ESP8266 Standalone has way to few pins for my needs even considered I already use 4051 Analog Multiplexer for expanding inputs.
What would you suggest as optional (better) way for getting WIFI connection than the ESP?
I have to concur with @Costas here. The Wemos is a way more stable platform. Even if you only want to use 1 or 2 pins it’s probably a better and more stable solution than an ESP “as is”. I’m really annoyed with the ESP-01 because it’s just not stable enough. Whatever firmware you run
I’ve got a Wemos D1 here but its not what I would like (and also could) use for my Project, even I already use Analog Multiplexers.
And considering its nothing more than an ESP with Arduino Firmware I could also just burn the Firmware on an ESP.
But since that’s no option I decided to combine the ESP with Arduino. The Stability of the ESP is not a problem with my later ones but they seem to mess up the buffer in Blynk or the Arduino.
So is there any other Option?
Also again the Question has anyone got Blynk and ESP got working together?
I did also update the App but since the problem already happens on hadware side It could only be a library problem.
My Lib that I installed is V037 and showing the Blynk_hardser and Softser libs as built in without any version number. Maybe there’s a problem?
On the other Hand, since the ESP is such a wide spread and cheap to get device, which is used more and more I can’t really understand why that’s seen as “not supported”. Wouldn’t it be a step ahead for Blynk if it would work with that device flawlessly?
For what I assume it should be pretty simple to incude a “check for bad response and trash it”-Routine which should get rid of the buffer overflow, which seems to habben in Blynk code (probably because of that mysterious “busy_p…” Response that probably fills up the buffer.
In general the ESP is perfectly stable for me and connects quick and flawlessly. The problem is mor about the ESP-Blynk AT communication which seems to mismatch. Should a reason to look into maybe.
Please explain why you couldn’t use a WeMos D1 or D1 mini for your project.
Is it the ESP-01 you are using?
If you look on the forum you will see untold misery from users with ESP’s as WiFi shields for Arduinos.
ESP’s are pretty stable even the ESP-01’s. The ESP’s are supported by Blynk but I agree with them that supporting them as a shield is not really worth the effort.
As you say the WeMos is just an ESP and any decent ESP is fine but in my book not fine when tied to an Arduino.
If you have lots of time and patience I’m sure you will get the ESP and Arduino working together. I don’t have the time or patience and regret the weeks I wasted hooking up ESP’s to Arduinos.
I could maybe make my project work with an ESP Standalone / Wemos if I have no other option. But has many drawbacks for me.
It has only one Analog pin with 1V range (just 3.3 because of Voltage divider) this would be a very low voltage range for my sensors. Also I would need a third Analog multiplexer which would require a 5th digital pin only for them.
So im left with 5 remaining pins which I would need to multiplex again …
Sure I could build an entire personal computer around my core but thats not what I was planning to.
Even the 2 Multiplexer I need now are wasting space I wasn’t planning to.
BUT…
What if I use this library as in the SimpleShield Demo?