Control an H-Bridge using a PwmOut (enable) and two DigitalOuts (direction select) For maxon controll
Dependents: NHK2015 NHK2015_new
Fork of Motor by
Diff: Motor.cpp
- Revision:
- 3:d35b291eb6f2
- Parent:
- 2:f265e441bcd9
- Child:
- 4:e98b342edd25
diff -r f265e441bcd9 -r d35b291eb6f2 Motor.cpp --- a/Motor.cpp Tue Nov 23 16:16:43 2010 +0000 +++ b/Motor.cpp Thu Sep 03 02:36:46 2015 +0000 @@ -28,7 +28,7 @@ _pwm(pwm), _fwd(fwd), _rev(rev) { // Set initial condition of PWM - _pwm.period(0.001); + _pwm.period(1/60000.0); _pwm = 0; // Initial condition of output enables