Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: main.cpp
- 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);
}
}
