diff --git a/platformio.ini b/platformio.ini index 1986b2b..55b6494 100644 --- a/platformio.ini +++ b/platformio.ini @@ -1,7 +1,7 @@ [platformio] [env] -platform = https://github.com/pioarduino/platform-espressif32/releases/download/55.03.32/platform-espressif32.zip +platform = https://github.com/pioarduino/platform-espressif32/releases/download/55.03.37/platform-espressif32.zip board_build.partitions = huge_app.csv framework = arduino extra_scripts = pre:version.py @@ -9,24 +9,28 @@ build_flags = -D PIOENV="\"$PIOENV"\" ; -D STACK_HIGH_WATERMARK_LOG lib_deps = - https://github.com/pschatzmann/ESP32-A2DP.git#v1.8.8 - https://github.com/pschatzmann/arduino-audio-tools.git#v1.2.0 - https://github.com/pschatzmann/arduino-audio-driver.git#v0.1.4 + https://github.com/pschatzmann/ESP32-A2DP.git @~1.8.9 + https://github.com/pschatzmann/arduino-audio-tools.git @~1.2.2 + https://github.com/pschatzmann/arduino-audio-driver.git @~0.2.1 + ; https://github.com/pschatzmann/ESP32-A2DP.git + ; https://github.com/pschatzmann/arduino-audio-tools.git + ; https://github.com/pschatzmann/arduino-audio-driver.git ;https://github.com/martinroger/espod.git monitor_filters = esp32_exception_decoder monitor_speed = 115200 [env:SBC_NodeMCU32S] +build_type = debug build_flags = ${env.build_flags} - -D CORE_DEBUG_LEVEL=2 + -D CORE_DEBUG_LEVEL=3 -D UART1_RX=16 -D UART1_TX=17 ; -D INVERT_LED_LOGIC board = nodemcu-32s lib_deps = ${env.lib_deps} - https://github.com/martinroger/espod.git#v0.1.0 + https://github.com/martinroger/espod.git @~0.1.0 lib_ignore = audio-driver [env:a1sMini] @@ -43,8 +47,6 @@ build_flags = -D INVERT_LED_LOGIC -D CORE_DEBUG_LEVEL=3 -D A2DP_SINK_NAME="\"A1S MiniPod"\" - - lib_deps = ${env.lib_deps} https://github.com/martinroger/espod.git#v0.1.0 diff --git a/src/main.cpp b/src/main.cpp index e68b133..fa9fcbd 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -43,6 +43,15 @@ #ifndef A2DP_SINK_NAME #define A2DP_SINK_NAME "espiPod" #endif +#ifndef WS_PIN +#define WS_PIN 25 +#endif +#ifndef DIN_PIN +#define DIN_PIN 26 +#endif +#ifndef BCLK_PIN +#define BCLK_PIN 27 +#endif #ifdef AUDIOKIT // Using the AiThink A1S AudioKit chip #include "AudioBoard.h" @@ -55,15 +64,6 @@ BluetoothA2DPSink a2dp_sink(i2s); #else // Case not using the audiokit, like Sandwich Carrier Board I2SStream i2s; BluetoothA2DPSink a2dp_sink; -#ifndef WS_PIN -#define WS_PIN 25 -#endif -#ifndef DIN_PIN -#define DIN_PIN 26 -#endif -#ifndef BCLK_PIN -#define BCLK_PIN 26 -#endif #endif /// @brief Data stream reader callback @@ -219,8 +219,8 @@ void initializeA2DPSink() { #ifdef AUDIOKIT minimalPins.addI2C(PinFunction::CODEC, 32, 33); - minimalPins.addI2S(PinFunction::CODEC, 0, 27, 25, 26, 35); - a2dp_sink.set_stream_reader(read_data_stream, false); // Might need commenting out + minimalPins.addI2S(PinFunction::CODEC, 0, BCLK_PIN, WS_PIN, DIN_PIN, 35); + // a2dp_sink.set_stream_reader(read_data_stream, false); // Might need commenting out auto cfg = i2s.defaultConfig(); cfg.copyFrom(info); i2s.begin(cfg);