ticker aan de praat proberen te krijgen

Dependencies:   MODSERIAL mbed QEI

Files at this revision

API Documentation at this revision

Comitter:
sivuu
Date:
Tue Oct 18 14:24:25 2016 +0000
Parent:
2:f70238e93bf0
Commit message:
werkende encoder met goede snelheid!

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r f70238e93bf0 -r 2a721ba5f4f5 main.cpp
--- a/main.cpp	Tue Oct 18 14:18:29 2016 +0000
+++ b/main.cpp	Tue Oct 18 14:24:25 2016 +0000
@@ -65,7 +65,7 @@
         previous_position = current_position;
         current_position = rev_counts_motor1;
         
-        snelheid = (current_position - previous_position) / ticker_TS;
+        snelheid = ((current_position - previous_position)*6.28318530718) / ticker_TS;
         pc.printf("snelheid is: %f \r\n", snelheid);
         
         tickerflag = 0;