LED control when using different power source

Code stays the same but the circuit you build is much different. You'll have to use a transistor with each LED you want to control. The 5V coming from the arduino trips the transistor to allow the higher voltage to flow to the LEDs. Now what transistor will work best for you depends on the power requirements of the LEDs.