PID motor controll for the biorobotics project.
Dependents: PID_example Motor_calibration Demo_mode Demo_mode ... more
Diff: motor.cpp
- Revision:
- 8:bff5193c7d74
- Parent:
- 7:eb8787e7a5f5
- Child:
- 9:48a0b4a67283
--- a/motor.cpp Wed Oct 31 08:47:16 2018 +0000 +++ b/motor.cpp Wed Oct 31 08:52:56 2018 +0000 @@ -68,7 +68,7 @@ } void Motor::set_target_angle(double angle) { - target_angle = angle * extra_reduction_ratio; + target_angle = angle / extra_reduction_ratio; } double Motor::get_current_angle() {