Hello
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
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.
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 ?
@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.
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.
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