I am building a device to control HA through ESP32-2432S028R (a.k.a CYD for “Cheap Yellow Display”). Theoretically, you can connect a speaker to the GPIO26 but i cannot make it work with ESPHome.
I am using this ESP32-2432S028R board. As you can see, there is a 2P 1.25mm JST connector to connect a speaker. It’s controlled with GPIO 26 (more info here).
I also find this code in the community around CYD, but it does not work.
i2s_audio:
i2s_lrclk_pin: GPIO25
i2s_bclk_pin: GPIO26
media_player:
- platform: i2s_audio
name: ESPHome I2S Media Player
dac_type: internal
mode: stereo
First, GPIO25 it is been already used by the display. To compile the code i modified it this way:
I’m also trying to get i2s_audio working in this board but only got cracking noises out of the speaker. I tried to remove touch screen code but it did not help. I cannot understand how the same pin could be used with touch screen and speaker.