I'm a novice Arduino coder. Can someone please explain if it's possible to include variables in a path name when opening files using the SdFat library? For example, I want to open "mario/config.txt" kind of like this:
But of course that doesn't concatenate properly. I discovered I can concatenate the two strings using strcat and pass that to myFile.open, but that eats up 11 bytes of SRAM (/config.txt) with static text. I'm very low on SRAM so every byte counts. Any suggestions?
In case any other noobs ever need a solution to this, it turns out that paths are relative to the current working directory. All I needed to do was store the folder name as a var, change my working directory to that, and then load my config.txt file.