Use IQS62X sensor and move motor by detected angle

Dependencies:   DRV8830 IQS62x IQSDisplayTerminal UIT_ACM1602NI mbed

Fork of Nucleo_ACM1602_I2C_DC by Thinkbed

MotorMove.h

Committer:
8mona
Date:
2018-01-30
Revision:
12:8464be95bf76
Parent:
9:b58e7d72a91c

File content as of revision 12:8464be95bf76:

#include    "mbed.h"
//#include    "DRV8830.h"


#define ACCEL_SIZE 6
#define DECEL_SIZE 6
#define LIMIT_TIME 30

class MotorMove{
    
    public:
     //DRV8830 motor; //Motor
     float vol_decel[DECEL_SIZE];
     float vol_accel[ACCEL_SIZE];
     float down_ratio;
     int  bflag_up;
     int bflag_down;
     
     
     
    void up_motor_set  (int time_counter, float speed);
    void down_motor_set (int time_counter, float speed);
    float ReturnMotorVol(int time_counter, int sw_flag1,int sw_flag2);
    
    private:
      int start_time_count;
      float Voltage;
      int accel_count;
      int decel_count;
      
      };