diff --git a/lib/ESP32-audioI2S b/lib/ESP32-audioI2S index edfcf9f..8ba3208 160000 --- a/lib/ESP32-audioI2S +++ b/lib/ESP32-audioI2S @@ -1 +1 @@ -Subproject commit edfcf9f57182b847c59523b7dc796b80b0e094a5 +Subproject commit 8ba32081845b36042bad806e38393ddd5882797b diff --git a/platformio.ini b/platformio.ini index ed30f57..3b9527d 100644 --- a/platformio.ini +++ b/platformio.ini @@ -1,5 +1,5 @@ ; PlatformIO Project Configuration File -; +; ; Build options: build flags, source filter ; Upload options: custom upload port, speed and extra flags ; Library options: dependencies, extra library storages @@ -9,12 +9,11 @@ ; https://docs.platformio.org/page/projectconf.html [env:d1_mini32] -platform = platformio/espressif32@~6.8.0 +platform = platformio/espressif32@6.11.0 board = wemos_d1_mini32 framework = arduino lib_deps = -# esphome/ESP32-audioI2S@^3.0.0 - me-no-dev/AsyncTCP@^1.1.1 + me-no-dev/AsyncTCP@^3.3.2 me-no-dev/ESP Async WebServer@^1.2.3 alanswx/ESPAsyncWiFiManager@^0.31 miguelbalboa/MFRC522@^1.4.10 diff --git a/src/main.cpp b/src/main.cpp index f06269b..bd1bc0a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -33,7 +33,7 @@ #define BAT_VOLTAGE_PIN 35 -#define RFID_LOOP_INTERVAL 30 +#define RFID_LOOP_INTERVAL 25 #define VOLTAGE_LOOP_INTERVAL 5000 @@ -364,7 +364,8 @@ bool playFile(const char *filename, uint32_t resumeFilePos) Serial.println("filename is empty."); return false; } - return audio.connecttoSD(filename, resumeFilePos); + //return audio.connecttoFS(filename, resumeFilePos); + return audio.connecttoFS(SD,filename,resumeFilePos); } void playNextMp3() @@ -392,7 +393,7 @@ void playNextMp3() Serial.print("Now advancing to "); String mp3File = currentNode->getCurrentPlayingFilePath(); Serial.println(mp3File.c_str()); - deactivateRFID(); + deactivateRFID(); activateSD(); playFile(mp3File.c_str()); activateRFID(); @@ -695,17 +696,18 @@ void setup() } - //deactivateSD(); - //activateRFID(); - //Serial.println("RFID"); + deactivateSD(); + activateRFID(); + Serial.println("RFID"); - // Init MFRC522 - // Init SPI bus + //Init MFRC522 + //Init SPI bus //SPI.begin(-1, -1, -1, CS_RFID); - //rfid.PCD_Init(CS_RFID, RST_RFID); + rfid.PCD_Init(CS_RFID, RST_RFID); -/* somehow this test stops rfid from working! - if (rfid.PCD_PerformSelfTest()) + //somehow this test stops rfid from working! + /* + if (rfid.PCD_PerformSelfTest()) { Serial.println("RFID OK"); }