How to combine autonomous sketch with bluetooth remote control

I have made 2 seperate working sketches for my Arduino Micro.  One uses dual HC-SR04 ultrasonic sensors and it roams around autonomously and I have also made a bluetooth control sketch using a BT2S bluetooth module.  I would like to combine the two programs so it runs around autonomously until it recieves a bluetooth command. 

Does anyone have a sketch example of this?

Thanks from a newb.