We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi,
Using the ARM Cortex KL25Z, I have stored the value from the board into a variable. I want to take those values and store it in a text file.
Here is the code I have tried:
FILE *f = fopen("file.txt", "w"); if (f == NULL) { printf("Error opening file!\n"); exit(1); } /* print integers and floats */ int i = 1; float py = 3.1415927; fprintf(f, "Integer: %d, float: %f\n", i, py); fclose(f);
The problems I encounter are:
- Doesnt create a file - Doesnt write to a file