Closed guteSeite closed 3 years ago
Sketch in example is the working one. Did You use my fork of ESP32-A2DP library? That fork has beed modified to support SPDIF output.
yes I tried this sketch with errors: on arduino 1.8.15:
/Users/bg/Documents/Arduino/libraries/ESP32-A2DP-master/examples/bt_music_receiver_simple/bt_music_receiver_simple.ino: In function 'void setup()':
bt_music_receiver_simple:21:28: error: no matching function for call to 'BluetoothA2DPSink::start(const char [8])'
a2dp_sink.start("MyMusic");
^
In file included from /Users/bg/Documents/Arduino/libraries/ESP32-A2DP-master/examples/bt_music_receiver_simple/bt_music_receiver_simple.ino:16:0:
/Users/bg/Documents/Arduino/libraries/ESP32-A2DP-master/src/BluetoothA2DPSink.h:89:10: note: candidate: void BluetoothA2DPSink::start(char, SPDIFOut)
void start(char name, SPDIFOut output);
^
/Users/bg/Documents/Arduino/libraries/ESP32-A2DP-master/src/BluetoothA2DPSink.h:89:10: note: candidate expects 2 arguments, 1 provided
exit status 1
no matching function for call to 'BluetoothA2DPSink::start(const char [8])'
I don't know how to define PDIFOut *output for working :-(
I thought You wanted to compile CD changer emulator. Now I see You want A2DP sink with SPDIF output. Try this: `#include "BluetoothA2DPSink.h"
BluetoothA2DPSink a2dp_sink; SPDIFOut *out;
void setup() {
out = new SPDIFOut(); a2dp_sink.start("MyMusic",out);
}
void loop() {}`
I tried compiling, and it did without any errors. I want to mention that You will need additional hardware for SPDIF working. In minimalistic solution it is one capacitor and two resistors forming voltage divider.
wow , now it's working! Thank you so much. I don't need hadware. Just a red LED and a resistor at the ESP32 pionout. Tested with my Yamaha Receiver.
Yes, for TOSLINK a LED is enough.
sorry for the wrong folder. Do you have a working arduino sketch for ESP32 A2DP SPDIF. Your example from 2020 is not working for me. Error because of a missing 2nd parameter (SPDIF output)