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