conflict with S3Servo #1569
-
Hello, I am trying to combine PWM Audio playing and servo control using a Xiao ESP32-S3 Sense I managed to play nicely .WAV files (@11025Hz) from SD card using PWMAudioOutput thanks to your library, but when I add a servo using ESP32S3Servo library, I get repetitive "clicks" on the speaker on top of sound, and servo does not work (it works when I disable arduino-audio-tools). ESP32S3servo uses basic ESP32 PWM control channels (ledcSetup, ledcAttachPin, ledcWrite). I tried to use different channels, but with no success. Any suggestion on where the conflict could be and how to address it ? Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
The AudioTools use the very same API. I am not sure if you can use these two libraries together because the might have different requirements in regard of the clock configuration. In any case you will need to make sure that you use different channels then the ones that are already used. You can check this when you activate the log level info |
Beta Was this translation helpful? Give feedback.
Maybe you need to add some wait loop at the beginning of your sketch (after Serial.begin()) to wait for Serial to be ready:
while(!Serial);