Control an H-Bridge using a PwmOut (enable) and two DigitalOuts (direction select)
Fork of Motor by
Diff: Motor.h
- Revision:
- 3:826e2cff5b02
- Parent:
- 2:f265e441bcd9
--- a/Motor.h Tue Nov 23 16:16:43 2010 +0000 +++ b/Motor.h Tue Oct 27 07:26:56 2015 +0000 @@ -45,6 +45,7 @@ * @param speed The speed of the motor as a normalised value between -1.0 and 1.0 */ void speed(float speed); + void brake(void); protected: PwmOut _pwm;