Advertisement
LeventeDaradici

ESP32 bluetooth speaker with PCM5102A DAC

Jun 21st, 2023
1,221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.42 KB | Source Code | 0 0
  1. #include "BluetoothA2DPSink.h"
  2.  
  3. BluetoothA2DPSink a2dp_sink;
  4.  
  5. void setup() {
  6.     i2s_pin_config_t my_pin_config = {
  7.         .bck_io_num = 27,
  8.         .ws_io_num = 26,
  9.         .data_out_num = 25,
  10.         .data_in_num = I2S_PIN_NO_CHANGE
  11.     };
  12.     a2dp_sink.set_pin_config(my_pin_config);
  13.     a2dp_sink.set_auto_reconnect(true);
  14.     a2dp_sink.start("MyMusic");
  15. }
  16.  
  17. void loop() {
  18.   delay(60000); // do nothing
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement