Test
Diff: stepperMotor.h
- Revision:
- 0:dd286de4bc2f
diff -r 000000000000 -r dd286de4bc2f stepperMotor.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/stepperMotor.h Mon Jan 11 11:07:32 2021 +0000 @@ -0,0 +1,26 @@ +#ifndef MBED_SMOTOR_H +#define MBED_SMOTOR_H + +#include "mbed.h" + +class sMotor { +public: + + sMotor(PinName A0,PinName A1, PinName A2, PinName A3); //motor constructor + + void step(int num_steps, int direction, int speed); + void anticlockwise(); + void clockwise(); + void off(); + + +private: + + DigitalOut _A0; + DigitalOut _A1; + DigitalOut _A2; + DigitalOut _A3; + +}; + +#endif \ No newline at end of file