OK, last time There is no magic widget that will do either… you have to learn how to program control and processing routines for both… at least to a small degree, in order to use/merge examples found on the internet.
Then you can add in Blynk as a GUI to run those programs and processes.
For use on the RPi, I personally I recommend using and learning NodeJS