This is how I call the function:
- char* sdFileName = "/v.ea";
- if (appendFile(SD, sdFileName, "Heyy")) {
- //success
- } else {
- //failed
- }
Code: Select all
file.seek(EOF)
- [W][sd_diskio.cpp:149] sdCommand(): token error [17] 0x17
- Appending succesfully.
- [W][sd_diskio.cpp:149] sdCommand(): token error [17] 0x17
- [W][sd_diskio.cpp:149] sdCommand(): token error [17] 0x5
- [W][sd_diskio.cpp:149] sdCommand(): token error [17] 0x5
- [E][vfs_api.cpp:265] VFSFileImpl(): fopen(/sd/v.ea) failed
- Appending failed.
Code: Select all
digitalWrite(SD_SS, LOW)
Code: Select all
HIGH
I've also tried both FAT32 and FAT, no success.
The example in SD(esp32) works fine - writing, appending, deleting, renaming, etc. all work well.
Thanks in advance.
UPDATE: seems like
Code: Select all
rfid.init();
- void activate_SD() {
- rfid.PCD_SoftPowerDown();
- digitalWrite(MFRC522_SSPin, HIGH);
- digitalWrite(SDMOD_SS, LOW);
- if (DEBUG == 1) {
- Serial.println("SD is active.");
- }
- }
- void activate_RFID() {
- rfid.PCD_SoftPowerUp();
- rfid.PCD_Init();
- digitalWrite(SDMOD_SS, HIGH);
- digitalWrite(MFRC522_SSPin, LOW);
- if (DEBUG == 1) {
- Serial.println("RFID is active.");
- }
- }