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:
- 6:8d2171811f14
- Child:
- 8:2abfdbf5a3b8
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Motor/Motor.h Fri Nov 11 06:37:24 2016 +0000 @@ -0,0 +1,22 @@ +#ifndef MBED_MOTOR_H +#define MBED_MOTOR_H + +#include "mbed.h" + +class Motor { +public: + Motor(PinName _M1PWM, PinName _M2PWM, PinName _M1DIR, PinName _M2DIR, PinName _D2, int signal_wait = 0, int step_wait = 500); + void clockwise(); + void anticlockwise(); +private: + DigitalOut M1PWM; + DigitalOut M2PWM; + DigitalOut M1DIR; + DigitalOut M2DIR; + DigitalOut D2; + + int step_wait; + int signal_wait; +}; + +#endif \ No newline at end of file