Use IQS62X sensor and move motor by detected angle
Dependencies: DRV8830 IQS62x IQSDisplayTerminal UIT_ACM1602NI mbed
Fork of Nucleo_ACM1602_I2C_DC by
MotorMove.h
- Committer:
- 8mona
- Date:
- 2017-10-02
- Revision:
- 9:b58e7d72a91c
- Parent:
- 8:f7ad1d7176ba
File content as of revision 9:b58e7d72a91c:
#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;
};
