I don’t understand what you are using the sync commands for… I was referring to the set property ones.
As long as the Blynk.setproperty()
commands come after the Blynk connection routines, they should work just fine in setup()
… or as stated, just use the BLYNK_CONNECTED()
function, but perhaps with a bunch of Lambda Timer Functions and timout timers.
For example, a set of four commands every two seconds. Play with the timing… perhaps 1/2 or 1 second between each batch; More or less commands per batch, etc.
BLYNK_CONNECTED() {
// Batch 1
Blynk.setProperty(V29, "offBackColor", "#FFFFFF");
Blynk.setProperty(V27, "onBackColor", "#FFFFFF");
Blynk.setProperty(V27, "offBackColor", "#FFFFFF");
Blynk.setProperty(V30, "onBackColor", "#FFFFFF");
// Timed Lambda Function - Batch 2
timer.setTimout(2000L, []() { // Run in two seconds
Blynk.setProperty(V30, "offBackColor", "#FFFFFF");
Blynk.setProperty(V31, "onBackColor", "#FFFFFF");
Blynk.setProperty(V31, "offBackColor", "#FFFFFF");
Blynk.setProperty(V32, "onBackColor", "#FFFFFF");
});
// Timed Lambda Function - Batch 3
timer.setTimout(4000L, []() { // Run in four seconds
Blynk.setProperty(V32, "offBackColor", "#FFFFFF");
Blynk.setProperty(V33, "onBackColor", "#FFFFFF");
Blynk.setProperty(V33, "offBackColor", "#FFFFFF");
Blynk.setProperty(V34, "offBackColor", "#FFFFFF");
});
// and so on...
}