Run script without wifi (ESP8622) (Arduino Code)

I’m building a controller for a greenhouse with esp 8266 and multiple sensors.
The transmission to Blynk works.
what I want to make sure is that the script runs even if there is no WIFI connection, or the script can be started without WIFI. ( the heating and ventilation are controlled by relays )
how can I just solve this ?
The gruns script is based on the example: ESP Standalone

Many thanks for your inputs


If you use Blynk.begin in your script then the code will stop at this point if there is no Wi-Fi/Blynk connection.

Instead, you can use Blynk.config and Blynk.connect, which won’t block the code execution if there’s no connection. If you search the forum you’ll find some excellent examples.



Many thanks for the answer

I’m completely lost…

Can someone send me a script where the PIN A0 is read and sent to Blynk Virtual Pin 4?
and also runs if no WIFI is available ?
and is displayed on the Serial Monitor ?

thank you very much

@Markus, you’re unlikely to get people writing your code for you on this site.
If you’d had a go at it yourself and were having a few issues then you may get some pointers about how to fix the issues, but we all have our own projects to work on.



Pin A0 is analog pin , wich device is connected to ?

it`s a soil sensor

regards Markus

I guess you are using Blynk server?
As you know, the app needs WiFi connection to display the value on V4.
You have to create a timer and call a function who reads A0 and write value to V4.

Yes, if the wifie connection is present, the standard code will work, but I am looking for a solution that will allow the code to work WITHOUT wifi.

It’s all about Greenhouse control, and I need to be sure that the code works WITHOUT wifi.


As I said before, you need to change your sketch so that it uses Blynk.config and Blynk.connect instead of Blynk.begin

The documentation about this is here:

Did you do as I suggested and search the forum for examples?
I’m not going to do your searching for you, but you should look for the C++ coding examples (work in progress) from @Gunner