Control a DC motor via a standard H-bridge using a PwmOut pin to control speed and two DigitalOut pins to control direction. Can change pwm period on the PwmOut pin, and also brake high or low.
Fork of Motor by
Diff: Motor.h
- Revision:
- 2:e138b2d99454
- Parent:
- 1:c75b234558af
--- a/Motor.h Tue Sep 07 11:21:42 2010 +0000 +++ b/Motor.h Tue Apr 11 19:55:45 2017 +0000 @@ -63,7 +63,7 @@ * Brake to GND => inA = inB = 0 * Brake to VCC => inA = inB = 1 */ - void brake(int highLow = BRAKE_HIGH); + void brake(int highLow = BRAKE_LOW); protected: PwmOut _pwm;