will an sts transistor work with an led cube powered by arduino?

sts 1979 f2 transistors

I know I'm supposed to use npn ,but I have sts 1979 f2 transistors and sto 1862 te3 transistors on hand.

No, you can't use PNP without some major re-design work. Steve
Thanks could you give me a reason why you cant? Are they not fit enough to handle the current, or do they react differently?
They are biased differently. Here're two transistors, the left one is PNP, the right, NPN.

How to get current to flow in the resistor ? Assume the top rail is +V and the bottom is a ground.

In the left one, GROUNDING the base turns on Q1

In the right, raising the base ABOVE ground turns on Q2

Note that the COLLECTOR of Q1 points to ground, the EMITTER ofQ2 does.