*VIDEO* Program react differently regards of POWER source - USB/BATTERY

Even if i delete this whole lines. The problem still appears. Here's the robot of this guy form who i have this code.
He have different sensor so i modify my code that it can fit to my sensor - 4WD Rover - basic obstacle avoidance - YouTube