Control an H-Bridge using a PwmOut (enable) and two DigitalOuts (direction select)
Fork of Motor by
Revision 3:d635bf41a049, committed 2018-10-05
- Comitter:
- m211002
- Date:
- Fri Oct 05 18:39:35 2018 +0000
- Parent:
- 2:f265e441bcd9
- Commit message:
- DC Motor Spin
Changed in this revision
Motor.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r f265e441bcd9 -r d635bf41a049 Motor.cpp --- a/Motor.cpp Tue Nov 23 16:16:43 2010 +0000 +++ b/Motor.cpp Fri Oct 05 18:39:35 2018 +0000 @@ -28,9 +28,9 @@ _pwm(pwm), _fwd(fwd), _rev(rev) { // Set initial condition of PWM - _pwm.period(0.001); + _pwm.period(0.02); _pwm = 0; - + // Initial condition of output enables _fwd = 0; _rev = 0;