02/07/15

Dependencies:   mbed

Dependents:   TabbedGUIMbed

Revision:
51:210353276e06
Parent:
50:d794595c6868
Child:
52:d21fc7266b66
--- a/Data.cpp	Wed Jul 15 15:16:03 2015 +0000
+++ b/Data.cpp	Wed Jul 15 15:39:10 2015 +0000
@@ -5,15 +5,17 @@
 void initialise()
 { 
     FILE *fp1 = fopen("/local/Datalog.xls", "a");       // opens or creates fill Datalog, and gives the headings
-    fprintf(fp1, " Sensor Name \t Speed \n");
+    int counter=5;
+    fprintf(fp1, " Test %d \n", counter);
+    fprintf(fp1, " Sensor Name \t Time \t Speed \n");
     fclose(fp1);
 }
 
-void data(int sensor_number, int speeds)
+void data(int sensor_number, int time, double speed)
 {
     printf("it be printing");                            //testing  
     FILE *fp = fopen("/local/Datalog.xls", "a");       // Open "Datalog
-    fprintf(fp, " %d \t %f \n",sensor_number, speeds);       //fills the tables with the results
+    fprintf(fp, " %d \t %d \t %f \n",sensor_number, time, speed);       //fills the tables with the results
     fclose(fp);
 }