is there a way to code sequential file names?
For example I am currently using an SD card to datalog some files. The file requires a very specialzed header file to export into another software for analysis. Each time I power cycle the mbed it will write the file header. This means that if there is an existing file with data the header will be written in the middle of the data stack. This is a problem for parsing.
I was thinking something like... (not actual code just an idea)
If (file X exists),
then create file (X+n)
open file X+n
write to file X+n
Now this would get more complicated since I have a switch to enable datalogging. Of course, the header has to write as the main loop initializes and the call function for the switch enabled datalog enables the loop after data collection.
is there a way to code sequential file names?
For example I am currently using an SD card to datalog some files. The file requires a very specialzed header file to export into another software for analysis. Each time I power cycle the mbed it will write the file header. This means that if there is an existing file with data the header will be written in the middle of the data stack. This is a problem for parsing.
I was thinking something like... (not actual code just an idea)
If (file X exists),
then create file (X+n)
open file X+n
write to file X+n
Now this would get more complicated since I have a switch to enable datalogging. Of course, the header has to write as the main loop initializes and the call function for the switch enabled datalog enables the loop after data collection.