New smaller slits code
Dependencies: PID
Fork of ES_CW2_Starter by
Diff: main.cpp
- Revision:
- 5:07b2e414d174
- Parent:
- 4:a436ddb6e57e
--- 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