Mekatronics Team G
Dependencies: BNO055_fusion PowerControl mbed BMP280
Fork of DEMO3 by
Diff: LOCOMOTION.h
- Revision:
- 23:455f7da3dd7a
- Parent:
- 19:2dd81b864e14
- Child:
- 24:fb1f083ebd62
diff -r a68c32db9f9d -r 455f7da3dd7a LOCOMOTION.h --- a/LOCOMOTION.h Sun Apr 03 06:15:52 2016 +0000 +++ b/LOCOMOTION.h Sun Apr 03 07:08:18 2016 +0000 @@ -15,21 +15,23 @@ class LOCOMOTION { public: - LOCOMOTION(PinName motor1F, PinName motor1B,PinName motor2F, PinName motor2B, PinName forward1, PinName forward2); + LOCOMOTION(PinName en, PinName motor1F, PinName motor1B,PinName motor2F, PinName motor2B, PinName forward1, PinName forward2); + DigitalOut _en; PwmOut _m1f; PwmOut _m1b; PwmOut _m2f; PwmOut _m2b; DigitalOut _m1dir; DigitalOut _m2dir; + void eStop(void); bool setXPos(int target, int current, int error, int angle); bool setYPos(int target, int current, int error, int angle); bool setAngle(int target, int current, int error, int mode); - void stopMotors(void); - inline int wrap(int num); protected: float s; + void stopMotors(void); + int wrap(int num); }; #endif \ No newline at end of file