2021-01-18 02:51 PM
Hi guys,
On USB Host Mass storage mode, I am creating a text file using (f_open(&myFile, "TEST2.TXT", FA_WRITE | FA_CREATE_ALWAYS function.
For writing text into the file, I use sprintf(rwtext, "Hello World"); function to write the text into the txt file.
Now, What function should I use if I want to log a "variable" that is changing from time to time and write it as a text in a txt file? (Like, X is an input voltage that's changing frequently, and I would like to log this voltage value and save it in a column as txt file in ).
Any help is highly appreciated on this.
Solved! Go to Solution.
2021-01-18 05:01 PM
The typical way is to use sprintf to print the variable to a local string buffer, and then send that buffer to the SD card.
2021-01-18 05:01 PM
The typical way is to use sprintf to print the variable to a local string buffer, and then send that buffer to the SD card.