pHAT DAC vs ws28128-rpi

There is impossible to configure pHAT DAC HAT with other PWM Leds library because both uses the same GPIO PWM port (Physically 12 PIN). When play sound the led sequence STOP and then I am get error trying to play sound again.
¿How I can configure additional PWM port in Raspberry PI ZERO when use pHAT DAC?
Than you.

The library works out most of the details for you, you should be able to just change the pin, as defined here, to a PWM supporting alternative:

Yes I know but when change to anoher PWM pin obtain error when execute script
It is no possible to set or output pwm.

you must use a PWM capable pin, obviously, as per commentary in the referenced line @gadgetoid posted. In practice, you should use bcm13 and PWM channel 1 (on line 13).

It is not possible:

from neopixel import *

LED strip configuration:

LED_COUNT = 20 # Number of LED pixels.
LED_PIN = 13 # GPIO pin connected to the pixels (must support PWM!).


sudo python
Gpio 13 is illegal for LED channel 0
Traceback (most recent call last):
File “”, line 83, in
File “build/bdist.linux-armv6l/egg/”, line 115, in begin
RuntimeError: ws2811_init failed with code -11 (Selected GPIO not possible)
ioctl_set_msg failed
: Inappropriate ioctl for device
ioctl_set_msg failed
: Inappropriate ioctl for device

please read the commentaries in the code and responses within this topic carefully… as mentioned you want channel 1, not 0. It works, I tried it when we decided to include a contributor’s pull request adding support for it.

I need two PWM output because One for Phat Dac and other for Led Strip.
The idea is led’s and sound works together in the same raspberry pi ZERO.

yes, that is the whole point of addressing the WS28xx via an alternative pin… the DAC will pipe sounds out through the I2S interface as normal while you will be driving the neopixels over PWM ch 1, as indicated.