Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.




Image Removed

Hardware Requirements:

  • Original ESP32/WROOM-32 with Bluetooth Classic
  • PCM5102A DAC
  • Arduino IDE

...

Select an original ESP32 board, such as ESP32 Dev Module. The ESP32-S3 and C3 are unsuitable because they do not support Bluetooth Classic A2DP.



Pinout

Image Added

Pinout

PCM5102AESP32
BCKGPIO 26
LCK, LRCK or WSGPIO 27
DINGPIO 25
SCKGND
GNDGND
VIN5 V

...

Code Block
#include <btAudio.h>

// Sets the name of the audio device
btAudio audio = btAudio("ESP_Speaker");

void setup() {
 
 // Streams audio data to the ESP32   
 audio.begin();
 
 // Re-connects to last connected device
 audio.reconnect();
 
 // Outputs the received data to an I2S DAC, e.g. https://www.adafruit.com/product/3678
 int bck = 26; 
 int ws = 27;
 int dout = 25;
 audio.I2S(bck, dout, ws);
}

void loop() {

}


References