Control an H-Bridge using a PwmOut (enable) and two DigitalOuts (direction select)
Revision 3:42a75eba182b, committed 2020-01-07
- Comitter:
- noamnahum
- Date:
- Tue Jan 07 08:57:50 2020 +0000
- Parent:
- 2:f265e441bcd9
- Commit message:
- m
Changed in this revision
Motor.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r f265e441bcd9 -r 42a75eba182b Motor.cpp --- a/Motor.cpp Tue Nov 23 16:16:43 2010 +0000 +++ b/Motor.cpp Tue Jan 07 08:57:50 2020 +0000 @@ -28,7 +28,7 @@ _pwm(pwm), _fwd(fwd), _rev(rev) { // Set initial condition of PWM - _pwm.period(0.001); + _pwm.period(0.00005); _pwm = 0; // Initial condition of output enables