Transistor not fully turning off.

The output of the digital pin may not be high enough to turn off the PNP transistor. I use a second resistor from the transitor base to the power supply.

V+ -- R1 -- base -- R2 -- digital pin