When you use a delay(x)
command it stops ALL CODE EXECUTION for x milliseconds.
This means that the device is totally unresponsive and not communicating with the Blynk server. You would be better using non-blocking delays where possible.
Also, this…
Defines a variable to hold the timer ID, and it’s initialised with a value of zero (because you didn’t specify any value, which is fine).
When you create your timer…
You aren’t discovering which ID has been allocated to that timer, and storing it in your `timerid’ variable. You capture the ID allocated to the timer like this…
timerid = timer.setInterval(pv1, colorChange);
But, there is a bug with the underlying SimpleTimer code (which BlynkTimer is based on) that causes issues when multiple timers are used. You can get around this by creating a dummy sacrificial timer to take-up the first timer slot.
You can read more about non-blocking timers, timer IDs and sacrificial timers here…
Pete.