Lauren Taylor / Mbed 2 deprecated phototransistor

Dependencies:   mbed

Revision:
9:3cbb586b65b2
Parent:
8:25fc7a5cff17
Child:
10:07df00712f4e
--- a/main.cpp	Thu Apr 12 15:30:53 2018 +0000
+++ b/main.cpp	Thu Apr 12 15:46:31 2018 +0000
@@ -8,9 +8,9 @@
 DigitalOut ledError(LED3);
 DigitalOut powerOn(p16);
 DigitalOut sdMount(p15);
-DigiatlOut ledRedTube(27);
-DigitalOut ledBlueTube(26);
-AnalogIn lightSensorTube(19);
+DigitalOut ledRedTube(p27);
+DigitalOut ledBlueTube(p26);
+AnalogIn lightSensorTube(p19);
 
 //This is our timer
 Ticker countClock;
@@ -69,17 +69,19 @@
         fprintf(fp,"%.4f,", checkLightSensor(checkTimes));
         fprintf(fp,"%.4f,", checkTubeLightSensor(checkTimes));
         
+        wait(1);
+        
         //Red Lights
         ledSwitch();
-        pc.printf("%.1f\r\n", timeClock.read());
+        pc.printf("%.1f,", timeClock.read());
         pc.printf("%.4f,", checkLightSensor(checkTimes));
-        pc.printf("%.4f,", checkTubeLightSensor(checkTimes));
+        pc.printf("%.4f\r\n", checkTubeLightSensor(checkTimes));
         
         fprintf(fp,"%.1f,", timeClock.read());
         fprintf(fp,"%.4f,", checkLightSensor(checkTimes));
         fprintf(fp,"%.4f\n\r", checkTubeLightSensor(checkTimes));
         
-        wait(2); 
+        wait(1); 
     }
 }