ESP32 4x SLOWER than ESP8266

would be nice to get a clear and concise ruling/description from the blynk developers on this topic :wink:

2 Likes

Maybe @Pavel could take a look at this ?

1 Like

@vshymanskyy - please take a look

1 Like

@Blynk_Coeur please don’t tag developers unless we missed an important topic.
We are monitoring the forum.

2 Likes

Ok man !
But you’re the only one who knows the answer to help us and we are going around in circles since 10 days.
:joy::joy:

I just tried my big project without Blynk.run()
It runs like a charm, and faster than before. (ESP32 Wemos)
So no need Blynk.run() in the loop !
weird :thinking:

But you have ANY blynk related functions in the loop that gets called over time right?
with no blynk related functions I get no syncs between device and server.

Only Timer.run()

Thanks for the answer.
This is already enough to trigger blynk (constantly) and what will make it work (and faster :smiley: ).

1 Like

I tested it further with another device that sometimes has to work offline for a certain period (wifi signal low at bad weather etc…) before it reconnects to the server again.
In the meantime it cannot wait for the server to be availible again and has to control some critical actors (water valves…).

I used this as an example:

It looses internet connection ~ever minute with only timer.run(); in the loop() but is stable if I add Blynk.run();.

To summerize my findigs:
Blynk.run(); makes the programm work slower.
In some conditions A LOT SLOWER!
If you have a blynk related function that gets called frequently (eg Blynk.virtualWrite(); or timer.run(); in the loop) the Blynk.run(); may not be mandatory.
But without it Blynk.run(); it looses connection to the server ~every minute (at least in my actual case… maybe not in general) but reconnects with a Blynk.connect();.

So sometimes Blynk.run(); can be omitted with a huge benefit.
Sometimes its is important to keep it.

:smiley:

1 Like

Hello @Phil333 can you sent to me how can i replace th Blynk.run with Time.run in the loop ,included all the libraries esp 32 Wi-Fi.
Tnx

Just delete blynk.run

Can’t connect to WiFi :pensive:

Please show us your sketch

1 Like

Yes of course @Blynk_Coeur
when i use the Blynk.run in the loop, the wifi still connected and usefull but when i delete it the Wifi connect in the first time and disconnected in 10 secondes and still disconnected !

#define BLYNK_PRINT Serial


#include <WiFi.h>
#include <WiFiClient.h>
#include <BlynkSimpleEsp32.h>

char auth[] = "_BmBkBSwSCAlLhtRb-*********";
char ssid[] = "D-Link";
char pass[] = "*********";
void setup()
{
  Serial.begin(9600);
  Blynk.begin(auth, ssid, pass);
}

void loop()
{
  Blynk.run();
}

Please edit your post to add triple backticks at the beginning and end of your code so that it displays correctly.
Triple backticks look like this:
```

Pete.

1 Like

You have to do a complete program.
You can not just do a program with nothing in it then
Blynk.run();
and also delete it.

You have to call any blynk related functions in your loop else than Blynk.run()…

It also is Timer.run().

If you dont understand what I have written before, than probably this optimization isnt for you.

ok, i undestand what you tell me
anyway thank you