Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: Motor/Motor.h
- Revision:
- 23:5238b046119b
- Parent:
- 22:c18f04d1dc49
--- a/Motor/Motor.h Fri Nov 18 02:47:59 2016 +0000 +++ b/Motor/Motor.h Fri Nov 18 11:55:33 2016 +0000 @@ -5,19 +5,24 @@ class Motor { public: - Motor(PinName _M1PWM, PinName _M2PWM, PinName _M1DIR, PinName _M2DIR, PinName _D2, int default_wait); + Motor(PinName _M1PWM, PinName _M2PWM, PinName _M1DIR, PinName _M2DIR, PinName _D2, int default_delay); void clockwise(); void anticlockwise(); - void clockwise(int wait); - void anticlockwise(int wait); + void clockwise(int delay); + void anticlockwise(int delay); void step_clockwise(int steps); void step_anticlockwise(int steps); - void step_anticlockwise(int steps, int wait); - void step_clockwise(int steps, int wait); + void step_clockwise(int steps, int delay); + void step_anticlockwise(int steps, int delay); void run (bool t); + void run2 (bool t); + void initialize (int middle); - int wait; - bool dir; + int delay; + int length; + bool dir; + int steps; + private: DigitalOut M1PWM; DigitalOut M2PWM;