I have a small ESP32 project which is connected to a HUB75 LED display and that takes care of about every interesting pin at least from a DAC/ADC perspective. Problem is, I would like to generate a bit of sound (for a kids game). The "old" obvious way is to use the build in DACs which the ESP32 has two of, but they're both taken by the default HUB75 connectors. I have a bit of a task to figure out if they're taken because they're DACs or because they're pins, but beside that - I am looking for a way to generate audio sound waves in the 1-5kHz range.
I'm looking for ideas to do this. I tried an external DAC that uses i2c but boy, that's slow and not even close to fun (at 9 bit resolution I don't even get 10Hz!). And for some reason it looks like my MCP4725 "turns off" the output when new data is sent - perhaps my "off the shelf" converter just isn't up to this task. I was thinking of using PWM to generate a sound wave but that seems to require yet another MCU and that sorta kills the idea. So I need ideas.
My next experiment is setting up a timer and use a digital pin out, even though that's a square wave that may be "good enough for 4 years old". But in the mean time I was thinking I may be overlooking the obvious here, so I wanted to ask.
At this point I may simply go with 555 and a fixed frequency I can turn on and off
But it would really be nice if I could have a small tune or speech from a WAV played.