Okay, your lack of understanding of C++ code structure is letting you down.
The void loop() is a special function which runs constantly.
What you need to do in your case is to put the code from your void loop (except Bynk.run()
which needs to remain where it is) into a new function that you’ve created.
If this code is just meant to run once on each press of the widget attached to V1 then the code could simply go in the BLYNK_WRITE(V1)
function instead.
Note that you can’t use delays with Blynk, so if you want the code that is currently in the void loop to execute once every second when the V1 widget is on then you should use a timer, and a flag.
Start by reading this:
http://help.blynk.cc/getting-started-library-auth-token-code-examples/blynk-basics/keep-your-void-loop-clean
then the "Overriding a Timer (auto/manual mode)` section of this topic:
for information about how to use a flag.
Pete.