2.007 PulleyInterface mbed code. Biomimetics robotics lab. Sangbae Kim. Ben Katz. For use with PulleyInterface.mlapp
Diff: main.cpp
- Revision:
- 2:a7100c183940
- Parent:
- 1:f97adef77f4b
- Child:
- 3:df56bf381572
diff -r f97adef77f4b -r a7100c183940 main.cpp --- 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++;