A simple key to enable or disable the app

That’s a lot of use of the word simple :stuck_out_tongue:

First, I fixed your code posting as required in the instructions…

Secondly, You shouldn’t be running all that code directly in your void loop() - Use timed function calls instead, which would also make it possible to enable/disable that function as needed via various methods, App button, Physical button, time, environmental condition, etc.

For the basics on timers, see these directions… particularly the PUSH section.

http://help.blynk.cc/getting-started-library-auth-token-code-examples/blynk-basics/how-to-display-any-sensor-data-in-blynk-app