NHK2017Ateamかにろぼ

Dependencies:   2017NHKpin_config mbed FEP HMC6352 MotorDriverController PID QEI omni

classDiagram

    \ ̄\                   / ̄/ 
/l     \  \             /  / lヽ  
| ヽ  ヽ   |           |  /  / | 
\ ` ‐ヽ  ヽ  ●        ●         /  / ‐  / 
  \ __ l  |  ||___|| /  l __ / 
     \  \ /      \/ 
      /\|   人__人  |/\       
    //\|             |/\\     
    //\|             |/\\     
    /     . \_____/         \ 

                               ┏┓        ┏━┓┏┓              
     ┏┓         ┏┓┏┓   ┏┓    ┏┓┗┛     ┏┓ ┗┓┃┗┛              
┏┛┗━┓  ┃┃┃┃    ┃┃┏━┛┗┓┏┓┏┛┗━┓┃┃┏┓┏┓┏━━━┓ 
┗┓┏━┛  ┃┃┗┛    ┃┃┗━┓┏┛┗┛┗┓┏┓┃┗┛┗┛┃┃┗━━━┛    
┏┛┃┏━┓┃┗━━┓┃┃┏━┛┗┓      ┏┛┃┃┃        ┃┃              
┃┏┛┗━┛┗━━┓┃┃┃┃┏┓┏┛      ┗━┛┃┃        ┃┃┏┓          
┃┃┏━━┓┏━━┛┃┃┃┃┗┛┃         ┏┛┃        ┃┃┃┗━━┓    
┗┛┗━━┛┗━━━┛┗┛┗━━┛         ┗━┛        ┗┛┗━━━┛  
Committer:
UCHITAKE
Date:
Thu Aug 24 08:16:21 2017 +0000
Revision:
6:590c9622ecf1
Child:
8:3987aa3d016b
Just worked !!!!!!!!

Who changed what in which revision?

UserRevisionLine numberNew contents of line
UCHITAKE 6:590c9622ecf1 1 /**
UCHITAKE 6:590c9622ecf1 2 * @file motor_driver.h
UCHITAKE 6:590c9622ecf1 3 * @brief モータ駆動クラス
UCHITAKE 6:590c9622ecf1 4 */
UCHITAKE 6:590c9622ecf1 5 #ifndef MOTOR_DRIVER_H
UCHITAKE 6:590c9622ecf1 6 #define MOTOR_DRIVER_H
UCHITAKE 6:590c9622ecf1 7
UCHITAKE 6:590c9622ecf1 8 #include "mbed.h"
UCHITAKE 6:590c9622ecf1 9 #include "pin_config.h"
UCHITAKE 6:590c9622ecf1 10
UCHITAKE 6:590c9622ecf1 11 #include "arm_unit.h"
UCHITAKE 6:590c9622ecf1 12 #include "wheel_unit.h"
UCHITAKE 6:590c9622ecf1 13 #include "MotorDriverController.h"
UCHITAKE 6:590c9622ecf1 14
UCHITAKE 6:590c9622ecf1 15 #define WHEEL_MDC_ADDR 7
UCHITAKE 6:590c9622ecf1 16 #define ARM_MDC_ADDR 6
UCHITAKE 6:590c9622ecf1 17 #define SLIDER_NUMBER 0
UCHITAKE 6:590c9622ecf1 18 #define ARM_NUMBER 1
UCHITAKE 6:590c9622ecf1 19
UCHITAKE 6:590c9622ecf1 20 /**
UCHITAKE 6:590c9622ecf1 21 * @brief モータ駆動クラス
UCHITAKE 6:590c9622ecf1 22 */
UCHITAKE 6:590c9622ecf1 23 class MotorDriver : MDC {
UCHITAKE 6:590c9622ecf1 24 public :
UCHITAKE 6:590c9622ecf1 25 /**
UCHITAKE 6:590c9622ecf1 26 * @brief コンストラクタ
UCHITAKE 6:590c9622ecf1 27 */
UCHITAKE 6:590c9622ecf1 28 MotorDriver();
UCHITAKE 6:590c9622ecf1 29
UCHITAKE 6:590c9622ecf1 30 /**
UCHITAKE 6:590c9622ecf1 31 * @brief スライダを動かす
UCHITAKE 6:590c9622ecf1 32 */
UCHITAKE 6:590c9622ecf1 33 void moveSlider(float speed);
UCHITAKE 6:590c9622ecf1 34
UCHITAKE 6:590c9622ecf1 35 /**
UCHITAKE 6:590c9622ecf1 36 * @brief ひみつ道具部分を動かす
UCHITAKE 6:590c9622ecf1 37 */
UCHITAKE 6:590c9622ecf1 38 void destroy(float speed);
UCHITAKE 6:590c9622ecf1 39
UCHITAKE 6:590c9622ecf1 40 /**
UCHITAKE 6:590c9622ecf1 41 * @brief あしまわりを動かす
UCHITAKE 6:590c9622ecf1 42 */
UCHITAKE 6:590c9622ecf1 43 void goXY(float X, float Y, float moment);
UCHITAKE 6:590c9622ecf1 44 void goCircular(float r, float rad, float moment);
UCHITAKE 6:590c9622ecf1 45
UCHITAKE 6:590c9622ecf1 46 private :
UCHITAKE 6:590c9622ecf1 47 Arm arm;
UCHITAKE 6:590c9622ecf1 48 WheelUnit quadOmni;
UCHITAKE 6:590c9622ecf1 49 double moveVector[2];
UCHITAKE 6:590c9622ecf1 50 double moveMoment;
UCHITAKE 6:590c9622ecf1 51 };
UCHITAKE 6:590c9622ecf1 52
UCHITAKE 6:590c9622ecf1 53 #endif//MOTOR_DRIVER_H