Hi guys,
just wanted to share my project on controlling a servo motor plugged onto a nodemcu board through the blynk app using a button widget. So basically what happens is that when the button widget is pressed on the app, the servo turns on and rotates based on a simple servo sweep sketch from the Arduino IDE examples. Once the button is pressed, the servo rotates continuously until the button is in the off position which is when the servo stops. This is done using virtual pins to run a certain type of code (in this case the servo sweep code) when the virtual pin is set to a high value (i.e when the button is pressed). The code below is tailored to run on a nodemcu board. Minor tweaks and changes can be made to make it suitable for different for different boards and also to modify how the servo rotates.

If you are wondering how I did this, all the credit goes to @GunnerTechTools. (Im a newbie myself)
I just took a look at a few topics he had solved and followed his instruction on reading the blynk docs
Hope this was helpful!

Blynk.run(); // Run rest of show in-between waiting for this loop to repeat or quit.

If you are concerned about somthing like the cradle() function taking too long (FYI, it isn’t now, even 180*10ms is only 1.8 seconds), then you should insert the Blynk.run() somewhere inside it’s for() loop processing, otherwise it will not do anything beneficial sitting where it is, after the function completes… by then the main loop is already running.