Cheking button state

The BLYNK_WRITE(V2) callback function will trigger whenever the state of the widget attached to V2 is changed.
So, the solution is to capture the value of V2 whenever it changes and store its latest value in a global variable.

Read this for more info on the details…

Pete.