For flywheel rig. Interfaces with matlab flywheel interface. 2.007 MIT Biomimetics Robotics Lab. Sangbae Kim. Ben Katz.

Dependencies:   mbed

Revision:
2:a7100c183940
Parent:
1:f97adef77f4b
Child:
3:df56bf381572
--- a/main.cpp	Fri Feb 03 20:09:00 2017 +0000
+++ b/main.cpp	Fri Feb 03 20:52:05 2017 +0000
@@ -77,7 +77,7 @@
 int main() {
     
     
-    const double vRef = 3.3;
+    const double vRef = 3;
     clock_t start;
     clock_t end = clock();
     int ticks;
@@ -115,7 +115,7 @@
             if(abrahamsCommand == '0'){ green = 0; }
             }
         if(publishCounter == samplesPerPublish){
-            printf("%f,%f,%f\n", motorCurrent.read()*vRef-(float)currentSensorOffset, motorVoltage.read(), velocity);
+            printf("%f,%f,%f\n", (double)motorCurrent.read()*vRef-currentSensorOffset, motorVoltage.read(), velocity);
             publishCounter = 1;
         }
         publishCounter++;