Motor Control with Raspberry on Blynk App

I can’t write your code for you.

The “good” code you show appears to be in Python? So either use Blynk’s Python library or figure out the proper way to control your motors with C++… THEN add in the Blynk interface.

NOTE Blynk Python is still in Alpha