How to modify the below code that the motor works (Turns on) for tamount of time

Thanks for all your times and efforts

Where I can find a APK for Bluetooth codes that has just two buttons for turning the motor to left and right without

At this time I use Bluetooth spp pro and that works great but I need a more compact software that by opening cam connect automatically to the device and by closing disconnect the Bluetooth in smartphone

Regards