Control an H-Bridge using a PwmOut (enable) and two DigitalOuts (direction select)
Dependents: Project_Bingo crabrace_upgrade
Fork of Motor by
Diff: Motor.cpp
- Revision:
- 3:ac544d825f01
- Parent:
- 2:f265e441bcd9
diff -r f265e441bcd9 -r ac544d825f01 Motor.cpp --- a/Motor.cpp Tue Nov 23 16:16:43 2010 +0000 +++ b/Motor.cpp Tue Oct 09 14:12:49 2018 +0000 @@ -28,7 +28,7 @@ _pwm(pwm), _fwd(fwd), _rev(rev) { // Set initial condition of PWM - _pwm.period(0.001); + _pwm.period_us(50); _pwm = 0; // Initial condition of output enables