hase(kari)
Diff: haseMD.h
- Revision:
- 0:24c2a636c6f0
diff -r 000000000000 -r 24c2a636c6f0 haseMD.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/haseMD.h Sat Jan 25 09:11:44 2020 +0000 @@ -0,0 +1,39 @@ +#ifndef _HASEMD_H_ +#define _HASEMD_H_ + +/** + * Includes + */ +#include "mbed.h" +#include "lpf.h" + +/** + *1pin blue motor driver :) + */ + +class HaseMD +{ +public: + /** + *長谷川さんのロボカップ用モータードライバのライブラリです + * + *@param pwmPin PWM出力ピン + */ + HaseMD(PinName pwmPin); + + /** + *モータードライバに出力 + * + *@param speed -1.0 ~ 1.0 + */ + void setSpeed(double speed_); + +private: + PwmOut pwmMD; + double _pwmMD ,speed; + Thread threadMD; + void MDloop(); + lpf mdlpf; +}; + +#endif \ No newline at end of file