hase(kari)

Committer:
THtakahiro702286
Date:
Sat Jan 25 09:11:44 2020 +0000
Revision:
0:24c2a636c6f0
mdpactice;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
THtakahiro702286 0:24c2a636c6f0 1 #ifndef _HASEMD_H_
THtakahiro702286 0:24c2a636c6f0 2 #define _HASEMD_H_
THtakahiro702286 0:24c2a636c6f0 3
THtakahiro702286 0:24c2a636c6f0 4 /**
THtakahiro702286 0:24c2a636c6f0 5 * Includes
THtakahiro702286 0:24c2a636c6f0 6 */
THtakahiro702286 0:24c2a636c6f0 7 #include "mbed.h"
THtakahiro702286 0:24c2a636c6f0 8 #include "lpf.h"
THtakahiro702286 0:24c2a636c6f0 9
THtakahiro702286 0:24c2a636c6f0 10 /**
THtakahiro702286 0:24c2a636c6f0 11 *1pin blue motor driver :)
THtakahiro702286 0:24c2a636c6f0 12 */
THtakahiro702286 0:24c2a636c6f0 13
THtakahiro702286 0:24c2a636c6f0 14 class HaseMD
THtakahiro702286 0:24c2a636c6f0 15 {
THtakahiro702286 0:24c2a636c6f0 16 public:
THtakahiro702286 0:24c2a636c6f0 17 /**
THtakahiro702286 0:24c2a636c6f0 18 *長谷川さんのロボカップ用モータードライバのライブラリです
THtakahiro702286 0:24c2a636c6f0 19 *
THtakahiro702286 0:24c2a636c6f0 20 *@param pwmPin PWM出力ピン
THtakahiro702286 0:24c2a636c6f0 21 */
THtakahiro702286 0:24c2a636c6f0 22 HaseMD(PinName pwmPin);
THtakahiro702286 0:24c2a636c6f0 23
THtakahiro702286 0:24c2a636c6f0 24 /**
THtakahiro702286 0:24c2a636c6f0 25 *モータードライバに出力
THtakahiro702286 0:24c2a636c6f0 26 *
THtakahiro702286 0:24c2a636c6f0 27 *@param speed -1.0 ~ 1.0
THtakahiro702286 0:24c2a636c6f0 28 */
THtakahiro702286 0:24c2a636c6f0 29 void setSpeed(double speed_);
THtakahiro702286 0:24c2a636c6f0 30
THtakahiro702286 0:24c2a636c6f0 31 private:
THtakahiro702286 0:24c2a636c6f0 32 PwmOut pwmMD;
THtakahiro702286 0:24c2a636c6f0 33 double _pwmMD ,speed;
THtakahiro702286 0:24c2a636c6f0 34 Thread threadMD;
THtakahiro702286 0:24c2a636c6f0 35 void MDloop();
THtakahiro702286 0:24c2a636c6f0 36 lpf mdlpf;
THtakahiro702286 0:24c2a636c6f0 37 };
THtakahiro702286 0:24c2a636c6f0 38
THtakahiro702286 0:24c2a636c6f0 39 #endif