new versions, rfid not yet working
This commit is contained in:
Submodule lib/ESP32-audioI2S updated: edfcf9f571...8ba3208184
@@ -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
|
||||
|
||||
24
src/main.cpp
24
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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user