02/07/15

Dependencies:   mbed

Dependents:   TabbedGUIMbed

Committer:
aidanPJG
Date:
Wed Jul 08 14:36:51 2015 +0000
Revision:
42:b9055f46cfed
Parent:
40:23008d8111d5
Child:
43:8e154016dd89
data.xls fixed;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
ADAMSTRUTT 35:085a674c9fdf 1 #include "mbed.h"
ADAMSTRUTT 35:085a674c9fdf 2
ADAMSTRUTT 35:085a674c9fdf 3 LocalFileSystem local("local");
ADAMSTRUTT 35:085a674c9fdf 4
ADAMSTRUTT 36:a2d20d5e5e19 5 void data(int sensor_number, int speed){
aidanPJG 42:b9055f46cfed 6 printf("Data program started"); //testing
aidanPJG 42:b9055f46cfed 7
aidanPJG 42:b9055f46cfed 8 FILE *fp = fopen("/local/Data.xls", "a"); // Open "Data.txt" on the local file system for writing
aidanPJG 42:b9055f46cfed 9 fprintf(fp, " Sensor Name \t Time \n");
aidanPJG 42:b9055f46cfed 10 fprintf(fp, " %d \t %d \f",sensor_number, speed);
ADAMSTRUTT 35:085a674c9fdf 11 fclose(fp);
ADAMSTRUTT 35:085a674c9fdf 12 }