I have used applog and that works fine but I want to have complete control over the arrangement of the saved CSV file so I am trying to write to the usb flash drive file from C
if (BXPulse==true)
{
FILE *file = fopen("usb:/data.csv", "w");
int variable1=2;
int variable2=4;
int variable3=6;
if (file != NULL) {
// Write CSV headers
fprintf(file, "Variable1,Variable2,Variable3\n");
// Write data (replace with your actual variables)
fprintf(file, "%f,%f,%f\n", variable1, variable2, variable3);
// Close the file
fclose(file);
} else {
// Handle error opening file
}
}
Using something like this. I do not know exactly what to put in the fopen line. Any help would be appreciated.
Thanks