A library for H-Bridge dual motor control
Revision 3:3332f633d674, committed 2017-10-22
- Comitter:
- Generic
- Date:
- Sun Oct 22 10:27:18 2017 +0000
- Parent:
- 2:c0e11aaa32e7
- Commit message:
- Fixed pwm calculation
Changed in this revision
DualMotorController.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/DualMotorController.cpp Sun Oct 22 09:18:19 2017 +0000 +++ b/DualMotorController.cpp Sun Oct 22 10:27:18 2017 +0000 @@ -25,7 +25,7 @@ _dirL1.write(1); } - _pwmL.write(speed); + _pwmL.write(speed/100.0f); } void DualMotorController::SetRight(float speed, bool forward) { @@ -37,5 +37,5 @@ _dirR1.write(1); } - _pwmR.write(speed); + _pwmR.write(speed/100.0f); } \ No newline at end of file