2017 hongo b team
Dependents: CtrlMD 2017_Bteam_alpha_slave
Diff: TS120.h
- Revision:
- 0:be058264e889
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/TS120.h Fri Sep 08 03:31:04 2017 +0000 @@ -0,0 +1,22 @@ +#ifndef MOTOR_DRIVER_TS120_H +#define MOTOR_DRIVER_TS120_H + +#include "mbed.h" +#include "MotorDriver.h" + +class TS120 : public MotorDriver +{ + public: + TS120(PinName pwm_pin, bool _dir_flip = false, double _flont_range = 1, double _back_range = 1); + virtual void drive(double _pwm); + virtual void drive(signed int _pwm, unsigned int max_pwm_abs = 127); + private: + bool dir_flip; + double flont_range; + double back_range; + PwmOut pwm_out; + static const int pwm_max = 2000; + static const int pwm_min = 1000; +}; + +#endif \ No newline at end of file