For my color monster game, I've been looking into SdFat. I've been able to write to a file in the root directory. I haven't been able to write a file in a subdirectory. I'd much rather save information in the game directory than in root. I did tried this:
dataFile.open("colormonster/colormn1.dat", O_WRITE | O_CREAT | O_TRUNC)
Anybody know what I'm doing wrong?
I downloaded the source code to SuperOteme. I copied the SdFat library from it. That works. I'm not pleased with this solution as I don't want to keep a copy of that source in my project. It also makes it difficult for my simulator to support it.
Has anyone gotten the SdFat library in Arduino IDE working? Do I need to initialize it differently or maybe alter the SdFatConfig.h settings?
Grrr... The SdFat library I copied from SuperOteme is not working. It creates the file in the subdirectory but fails to write to it. I'm unsure if it did work and started failing or if I never checked the file size and it never worked.
For the time being I've gone back to the Arduino IDE SdFat library and store files in the main directory.
Please use SdFat in the new version of SuperOteme.(SuperOteme103_source.zip)
http://daimonsoft.info/kuran_kuran/index.php?TinyArcade%2FSuperOteme
Quote from: kuran_kuran on June 20, 2018, 03:47:27 AM
Please use SdFat in the new version of SuperOteme.(SuperOteme103_source.zip)
http://daimonsoft.info/kuran_kuran/index.php?TinyArcade%2FSuperOteme
That does work. I started comparing parts of the code to the Arduino SdFat library. I believe I found the issue (https://github.com/greiman/SdFat/issues/107). Unfortunately this means I have to tell people to install the library and then fix it or include a copy in my code. I don't like those options.
SdFat developer has checked in my fix. SdFat 1.0.6 should work.