小日向さんのMDライブラリ
Dependents: 00_yotsuba 10_motor-test 00_yotsuba 200_yotsuba_21 ... more
kohiMD.h
- Committer:
- piroro4560
- Date:
- 2020-12-12
- Revision:
- 4:542898c657be
- Parent:
- 1:87d96da7a474
File content as of revision 4:542898c657be:
#ifndef _KOHIMD_H_ #define _KOHIMD_H_ /** * Includes */ #include "mbed.h" #include "lpf.h" /** *1pin blue motor driver :) */ class KohiMD { public: /** *小日向さんのロボカップ用モータードライバのライブラリです * *@param pwmPin PWM出力ピン */ KohiMD(PinName pwmPin); /** *モータードライバに出力 * *@param speed -1.0 ~ 1.0 */ void setSpeed(double speed_); private: PwmOut pwmMD; double _pwmMD ,speed; Thread threadMD; void MDloop(); lpf mdlpf; Ticker drive; BufferedSerial pc; }; #endif