Writing and Reading Variables to and from the SD card slot on Wio Terminal

Greeting everyone. I am trying to create a program that can create and use presets on the Wio Terminal. I understand that I will need to use the SD read and write functions, but the example code just creates a file with no data written in it. I saw a similar thread that talks about this issue and it had a reference to a sample code in Github. However, this does not compile for me.

I also found another topic on multi-partition which had code that did compile, but has a lot more functions included that I don’t quite under and I think it also included saving to flash, which is not my intention. This did somewhat save text to a file but still doesn’t help because of all the extra code, which was a lot busier than the example code. I think there is a bug with the Wio terminal example for basic read and write to the sd.

My main reason for this post is to ask how would I configure the Wio Terminal to save variables to the SD card to be able to create presets that load even after powering down. Ex. My Wio Terminal program has default parameters that can be adjusted by the buttons. After I have made all the changes I want, I can select a button that is mapped to save all variables to a text file on the SD card. These saved settings should load in or be read during the setup function when powering on the device. That way I can use and create presets and share them with other devices running my code.

I have found a topic on this by using strok (I don’t understand how to write a code with it yet) to organize a list of variables to be read after it is saved to the text file.

I am asking for help with producing a very basic full code example of this using the Wio terminal. Even saving two variables, then reading those two variables back to the controller will be more than enough. I am willing to put in the time to understand the code in-depth, but I am just having issues getting things to work on the Wio Terminal that I have gotten to work on standard Arduino boards.

Usually, I run the example code(it compiles) then I study each element to understand how everything works to achieve the intended function. Yet on the Wio Terminal, a lot of the example code does not succeed at its functions, or sometimes in my case, it doesn’t even compile.

Thanks in advance for anyone will to give guiadence.