I’ve read various posts on this subject as far as I could search in the forum.
I want to deploy a board and be able to diagnose the problems that occur, if any, using LEDs as indicators. Eg. The process begins with trying to connect to a WiFi AP. Then goes on to try to connect to the Blynk server. Each stage would be indicated by a LED action.
I see we can use blynk.config() and similar routines from the library. The library is written to be solid and takes care of many conditions. I don’t want to try my own sequence and fail. I also don’t want to modify the library. If we execute blynk.begin(), the call returns only after connection. Thus, the only event that can get called is BLYNK_CONNECTED() at the end. I use this to do a Blynk.syncAll().
Am I wrong? Are there events that get called for which we can write routines like we do for connection to Blynk being established?
Did some more reading up. Looks like I’ll need to use a timer to call a routine where I should check the status of WiFi connection and Blynk connection. Based on that, will need to take appropriate action like lighting up appropriate LEDs.
Is this process correct?
In essence, yes. Top right of the page is a button “Docs”. It has a chapter on connection management which will guide you as to handle Blynk connections.
@Costas @Gunner @Lichtsignaal Thanks to all of you, I’ve progressed well in my project.
I’m a newbie to Blynk and am just learning coding in C. I’ve almost completed my project where I control 4 lights/fans using a NodeMCU board. It is right now in a form where the module can be shipped and the user can set it up himself. WifiManager from @tzapulica was wonderful and of great help as were the example sketches.
I’m thrilled with myself eventhough this maybe a small thing for gurus on this forum. I hope to be able to ramp up and guide others that come into the forum a few months down the line.
Planning to get my hands dirty reflashing a few sonoffs with Blynk. First time hardware foray for me.
2 Likes