Page 1 of 1
ESP32 playing sound example
Posted: Sat Apr 08, 2017 2:15 pm
by pcbreflux
There maybe many other ways to play sounds with the ESP32 but this is my example:
https://github.com/pcbreflux/espressif/ ... pio_buzzer
Press GPIO 0 button!
Re: ESP32 playing sound example
Posted: Sat Apr 08, 2017 3:03 pm
by pcbreflux
Works also with a small speaker. Hopefully the GPIO will no be abused?
Re: ESP32 playing sound example
Posted: Sat Apr 08, 2017 4:12 pm
by loboris
I would recommend using 100 ohm resistor and 10uF (+ toward gpio) capacitor between GPIO and speaker or the gpio eventualy will be damaged.
Re: ESP32 playing sound example
Posted: Sun Apr 09, 2017 8:40 pm
by pcbreflux
Thank you, if I realy think about it (not just try it without a thought) - the speaker is rated 8 Ohms and if the esp32 is supplied with 3.3V the current can peek at 412.5mA - way to high for the gpio. With the 100Ohms its down to 30mA.