From daec240c52b1735e17860b3bc9d424d0bbc24377 Mon Sep 17 00:00:00 2001 From: Frank Date: Sat, 4 May 2024 13:55:25 +0200 Subject: [PATCH] small improvement for athom music --- platformio.ini | 7 +++++-- usermods/audioreactive/audio_reactive.h | 3 ++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/platformio.ini b/platformio.ini index 19df7ac7..e3af913d 100644 --- a/platformio.ini +++ b/platformio.ini @@ -2354,13 +2354,14 @@ board_build.partitions = tools/WLED_ESP32_16MB.csv ;; WLED standard for ;https://www.athom.tech/blank-1/wled-esp32-music-addressable-led-strip-controller [env:athom_music_esp32_4MB_M] extends = esp32_4MB_M_base -build_flags = ${esp32_4MB_M_base.build_flags} ${Athom_PDMmic.build_flags} +build_flags = ${esp32_4MB_M_base.build_flags} + ${Athom_PDMmic.build_flags} -D WLED_AP_SSID_UNIQUE -D WLED_RELEASE_NAME=athom_music_esp32_4MB_M -D ABL_MILLIAMPS_DEFAULT=14500 ; max 15A -D WLED_DISABLE_MQTT -D WLED_DISABLE_LOXONE -D WLED_DISABLE_ADALIGHT ;to get 4ld working - -D BTNPIN=0 -D RLYPIN=2 -D IRPIN=25 -D IRTYPE=9 -D LEDPIN=18 -D + -D BTNPIN=0 -D RLYPIN=2 -D IRPIN=25 -D IRTYPE=9 -D LEDPIN=18 -D AUDIOPIN=-1 ; -D TEMPERATURE_PIN=23 -D FLD_PIN_SCL=-1 -D FLD_PIN_SDA=-1 ; use global! @@ -2370,6 +2371,8 @@ build_flags = ${esp32_4MB_M_base.build_flags} ${Athom_PDMmic.build_flags} ; -D PIR_SENSOR_PIN=-1 ; -D PWM_PIN=-1 ; -D WLED_USE_MY_CONFIG +; RAM: [=== ] 25.9% (used 84948 bytes from 327680 bytes) +; Flash: [==========] 95.9% (used 1509113 bytes from 1572864 bytes) ;https://shop.myhome-control.de/Elektronik/ [env:abc_wled_controller_v43_S] diff --git a/usermods/audioreactive/audio_reactive.h b/usermods/audioreactive/audio_reactive.h index 18c9ad23..6e4189fe 100644 --- a/usermods/audioreactive/audio_reactive.h +++ b/usermods/audioreactive/audio_reactive.h @@ -1801,7 +1801,8 @@ class AudioReactive : public Usermod { delay(100); // Give that poor microphone some time to setup. #if !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32C3) - if ((i2sckPin == I2S_PIN_NO_CHANGE) && ((dmType == 1) || (dmType == 4)) ) dmType = 5; // dummy user support: SCK == -1 --means--> PDM microphone + if ((i2sckPin == I2S_PIN_NO_CHANGE) && (i2ssdPin >= 0) && (i2swsPin >= 0) + && ((dmType == 1) || (dmType == 4)) ) dmType = 51; // dummy user support: SCK == -1 --means--> PDM microphone #endif useInputFilter = 2; // default: DC blocker