02/07/15

Dependencies:   mbed

Dependents:   TabbedGUIMbed

Revision:
14:dee4cef00b32
Parent:
8:b8a798d32630
Child:
17:d9fb4a3780c7
--- a/main.cpp	Fri Jul 03 14:05:08 2015 +0000
+++ b/main.cpp	Tue Jul 07 08:23:23 2015 +0000
@@ -1,5 +1,6 @@
 #include "mbed.h"//is it working
 #include <time.h>
+#include <Calculate.h>
 #include <string>
 #include <iostream>
  
@@ -13,38 +14,5 @@
 int main()
 {
 
-    pc.printf("new program \n");                                            //alert user of initialisation   
-      
-    time_t sensor1_time ;
-    time_t sensor2_time ; 
-    time_t sensor3_time ;
-    double sensor2Seconds; 
-    double sensor3Seconds;
-     
-     //  while(!sensor4)                                                      //until last sensor because that will be when its over.     
-      // {                                      
-        if (sensor1)                                                          //checks the digital input from the diode.
-        {
-         
-            led = 1;
-            sensor1_time = time(NULL);
-        }
-           if (sensor2)                                                          //checks the digital input from the diode.
-        {
-           
-            led = 1;
-            sensor2_time = time(NULL);
-            sensor2Seconds = difftime(sensor2_time, sensor1_time);
-            pc.printf(" 2nd time  %d : \t", sensor2Seconds);
-        }
-        if (sensor3)                                                          //checks the digital input from the diode.
-        {
-           
-            led = 1;
-              sensor3_time  = time(NULL);
-              sensor3Seconds  = difftime(sensor3_time, sensor2_time);
-              pc.printf("3rd time  %d : \t", sensor3Seconds );
-        }
-       
-  //     }
+  calculate();
 }