Which type of transistor for pulsing LED strip?
Typical problems in these circuits are:


You did not tie the grounds together. A transistor requires a common reference voltage to work. If you do not connect the 5V supply's ground to the 24V supply's ground, then the two voltages are not referenced to each other. Transistors are not isolated from one side to the other.
Wired incorrectly. Double check the orientation. Replace them to test.
You are not pulling the pin down all the way. You may be putting it in a pull up state instead of output ground. This is a software condition.
The transistor, a Darlington, has a high gain, which is why a floating base may allow it to conduct. Floating pins act like tiny antennas. Try adding a pull down resistor from base to the common ground, to force it off. Try 1kΩ and move from there.
The power supply is bad or does not regulate well. 30V collector to emitter will break those transistors.


For 1 and 4. You don't need to do 4, but 1 is required:







simulate this circuit &ndash; Schematic created using CircuitLab

The blue lines represent the common ground you should be connecting. R1 is an example weak pull-down resistor to force the transistor off.