Motor
Diff: motor.h
- Revision:
- 0:8a7754ecb574
diff -r 000000000000 -r 8a7754ecb574 motor.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/motor.h Wed May 16 10:28:22 2018 +0000 @@ -0,0 +1,22 @@ +#ifndef MOTOR_H +#define MOTOR_H + +#include "mbed.h" + +extern DigitalOut dir1, dir2, dir3, dir4; +extern PwmOut pwm1, pwm2; +extern Serial pc; +class MOTOR { +public: + void balance(float speed);//counter the falling of the robot + void forward();//go forward + void backward();//go backward + void left();//turn left + void right();//turn right + void stop();//stop the motors +protected: + + +}; + +#endif