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
So go back to whoever told you that, and get them to help you with it