LED control when using different power source

it should be noted that you need a current limiting resistor (~1k) tween the arduino and the base of the transistor, as it shorts to ground also