code

Dependencies:   mbed

Fork of Robotics_Lab_DCMotor by NTHU_PME_Robotics_2018

Revision:
1:6747911cdd90
Parent:
0:0971f0666990
Child:
2:9caf46a5fe5a
--- a/main.cpp	Thu Apr 07 22:53:48 2016 +0000
+++ b/main.cpp	Thu Apr 07 23:00:14 2016 +0000
@@ -58,7 +58,7 @@
 void timer1_interrupt(void)
 {
     //Motor 1
-    v1 = (float)v1Count * 100.0f / 12.0f * 60.0f / 29.0f;
+    v1 = (float)v1Count * 100.0f / 12.0f * 60.0f / 29.0f;   //unit: rpm
     v1Count = 0;
     
     ///code for PI control///
@@ -73,7 +73,7 @@
     
     
     //Motor 2
-    v2 = (float)v2Count * 100.0f / 12.0f * 60.0f / 29.0f;
+    v2 = (float)v2Count * 100.0f / 12.0f * 60.0f / 29.0f;   //unit: rpm
     v2Count = 0;
     
     ///code for PI control///