Init
Dependents: JetflyerMotorController
Diff: Motor.h
- Revision:
- 1:39b173360768
- Parent:
- 0:5eb2bad9ea40
--- a/Motor.h Mon Jun 12 19:58:20 2017 +0000 +++ b/Motor.h Thu Jul 13 13:42:32 2017 +0000 @@ -0,0 +1,34 @@ +#include "mbed.h" + + +#ifndef MOTOR_H +#define MOTOR_H + +#define pin_forward p29 +#define pin_backward p30 +#define pin_pwm_motor p23 + + + + +class Motor +{ + public: + Motor(); + ~Motor(); + + DigitalOut forward; + DigitalOut backward; + AnalogOut throttle; + + int drive(int speed, int direction); + + + private: + + int direction_old; + + +}; + +#endif \ No newline at end of file