Problems using PING sensor with PWM on 2 motors

When I unplug from the USB and use a 9V

I hope the rest of the sentence says "2 amp regulated power supply" and not "smoke alarm battery"