Ljubivoj Cvitas
/
SunflowerMach1a
Slow version
Fork of SunflowerMach1 by
Diff: Motor.h
- Revision:
- 1:2e7d4aa6e79e
- Parent:
- 0:7447b8021b33
diff -r 7447b8021b33 -r 2e7d4aa6e79e Motor.h --- a/Motor.h Fri Nov 08 19:09:47 2013 +0000 +++ b/Motor.h Fri Nov 08 22:33:31 2013 +0000 @@ -9,15 +9,21 @@ private: DigitalOut positiveOut, negativeOut; + PwmOut enableOut; + + void initpwm(); void move(); + void moveslow(); short direction; public: - Motor(PinName, PinName); + Motor(PinName, PinName, PinName); void movePositive(); void moveNegative(); void stop(); - + void movePositiveSlow(); + void moveNegativeSlow(); + void stopslow(); };