Lauren Taylor / Mbed 2 deprecated phototransistor

Dependencies:   mbed

Revision:
7:f7368fed0a2f
Parent:
6:892ecb5fcfb9
Child:
8:25fc7a5cff17
--- a/main.cpp	Tue Apr 10 21:34:08 2018 +0000
+++ b/main.cpp	Tue Apr 10 21:35:08 2018 +0000
@@ -55,18 +55,20 @@
     while(true) {
         //Blue Light
         ledSwitch();
+        pc.printf("%.1f, ", timeClock.read());
         pc.printf("%.4f, ", checkLightSensor(checkTimes));
-        pc.printf("%.1f, ", timeClock.read());
+        fprintf(fp,"%.1f, ", timeClock.read());
         fprintf(fp,"%.4f, ", checkLightSensor(checkTimes));
-        fprintf(fp,"%.1f, ", timeClock.read());
+        
         wait(1);
         
         //Red Light
         ledSwitch();
+        pc.printf("%.1f\r\n ", timeClock.read());
         pc.printf("%.4f, ", checkLightSensor(checkTimes));
-        pc.printf("%.1f\r\n ", timeClock.read());
+        fprintf(fp,"%.1f\r\n", timeClock.read());
         fprintf(fp,"%.4f, ", checkLightSensor(checkTimes));
-        fprintf(fp,"%.1f\r\n", timeClock.read());
+        
         wait(1); 
     }
 }