PWM-controlled RGB LED is flickering when PNP transistor should be off. Any insights why?
When the GPIO is low the the NPN transistor is OFF (open). Thus, the PNP transistor base is floating (not terminated). Provide a valid weak termination. Place a high value resistor between base of the PNP and the 5V line. This should keep the PNP transistor always in a valid state.