![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
02/07/15
Dependencies: mbed
Diff: Data.cpp
- Revision:
- 42:b9055f46cfed
- Parent:
- 40:23008d8111d5
- Child:
- 43:8e154016dd89
diff -r 93e728f291f3 -r b9055f46cfed Data.cpp --- a/Data.cpp Wed Jul 08 10:49:31 2015 +0000 +++ b/Data.cpp Wed Jul 08 14:36:51 2015 +0000 @@ -3,8 +3,10 @@ LocalFileSystem local("local"); void data(int sensor_number, int speed){ - FILE *fp = fopen("/local/Data.xls", "w"); // Open "Data.txt" on the local file system for writing - fprintf(fp, "Sensor Name\tTime\n"); - fprintf(fp, "Sensor %d\t%d\f",sensor_number, speed); + printf("Data program started"); //testing + + FILE *fp = fopen("/local/Data.xls", "a"); // Open "Data.txt" on the local file system for writing + fprintf(fp, " Sensor Name \t Time \n"); + fprintf(fp, " %d \t %d \f",sensor_number, speed); fclose(fp); } \ No newline at end of file