The storage of the values of the variables is for me absolutely useless if I can't retrieve the values after a reset.
Why wouldn't it be possible to find the file after a reset?
What I try to accomplish is:
1. Retrieve the values of three different variables from a file on the local mbed Microcontroller USB disk drive.
2. Next, use these variabeles in my program. And when neccesary update the values of the variabeles in the file on the local mbed Microcontroller USB disk drive. (so persistenly store the data)
3. Power-down the LPC1768.
4. Power-up the LPC1768 and retrieve the values of the three variabeles (just like step 1) from the file.
I know how to simply write values to a file, but I don't know how to parse a file to retrieve the values of the variables.
I like to store the values of different variables persistently in a file on the local mbed Microcontroller USB disk drive and retrieve these values after a reset.
To clarify:
- I have a file on the local mbed Microntroller disk drive with the name 'Variables.txt'.
- In this file I like to store some variables that are calculated in my program (based on sensor data). For example: VARIABLE_A, VARIABLE_B, VARIABLE_C
- After a reset I like to retrieve the values corresponding to these variables so that I can access them again in my program.
- I also want to update the values in the file.
Can anyone tell me how this can be accomplished?
Thanks!