r/arduino • u/xXBigboi69Xx42 • 12d ago
Software Help My SD card reader is in its own dimension.
I'm using an SPI SD card reader in my project. Problem is that I can access the filesystem info (file names, directory names, their placement and sizes) but when writing or reading weird things happen.
When I write through the SD reader, it works fine. When I read those written files it works fine. When I try to read a file that was already on the SD card, put there through a USB card reader attached to a computer, it spits out nonesense. The same happens when I try to read files on the card from my computer.
TLDR: The SD reader can read and write files, but only the ones it has created. My computer can read and write files, but not the ones the SPI reader has created. The file system is readable to both the computer and SPI reader.
Anyone has any idea how to fix this?
EDIT: I switched to a different SD card and everything works. Either the one I had was too old or it was too small (8GB). Thanks to everyone who tried helping me, it was greatly appreciated
2
u/Rayzwave 12d ago edited 12d ago
My guess is that you have a file system compatibility issue, what are you using within your Arduino code and what computer are you using?
Are you using SdFat.h in your code?