New smaller slits code

Dependencies:   PID

Fork of ES_CW2_Starter by Edward Stott

Files at this revision

API Documentation at this revision

Comitter:
Iswanto
Date:
Sat Mar 18 15:17:31 2017 +0000
Parent:
4:a436ddb6e57e
Commit message:
Corrected cleanup

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Sat Mar 18 15:10:48 2017 +0000
+++ b/main.cpp	Sat Mar 18 15:17:31 2017 +0000
@@ -109,7 +109,7 @@
 void printStatus() {
     while(1){
         led3 = !led3;
-        //pc.printf("%f\n\r",revPerSec);
+        pc.printf("%f\n\r",revPerSec);
         wait(2);
     }
 }
@@ -186,9 +186,7 @@
 int main() {
     
     // Initialize threads
-    Thread status;
     Thread controlLoopThread;
-    status.start(printStatus);
     controlLoopThread.start(controlLoop);
     t.start();
     
@@ -219,7 +217,7 @@
     // Slits interrupts
     CHAintr.rise(&measureSpeedSlits);
     CHBintr.rise(&measureSpeedSlits);
-    CHAintr.fall(&meeasureSpeedSlits);
+    CHAintr.fall(&measureSpeedSlits);
     CHBintr.fall(&measureSpeedSlits);
     
     // USE FOR PHOTOINTERRUPTERS