Use IQS62X sensor and move motor by detected angle

Dependencies:   DRV8830 IQS62x IQSDisplayTerminal UIT_ACM1602NI mbed

Fork of Nucleo_ACM1602_I2C_DC by Thinkbed

Committer:
8mona
Date:
Sat Sep 30 16:43:51 2017 +0000
Revision:
8:f7ad1d7176ba
Child:
9:b58e7d72a91c
Activate IQS62X and motor and IO Switch

Who changed what in which revision?

UserRevisionLine numberNew contents of line
8mona 8:f7ad1d7176ba 1 #include "mbed.h"
8mona 8:f7ad1d7176ba 2 //#include "DRV8830.h"
8mona 8:f7ad1d7176ba 3
8mona 8:f7ad1d7176ba 4
8mona 8:f7ad1d7176ba 5 #define ACCEL_SIZE 6
8mona 8:f7ad1d7176ba 6 #define DECEL_SIZE 6
8mona 8:f7ad1d7176ba 7 #define LIMIT_TIME 30
8mona 8:f7ad1d7176ba 8
8mona 8:f7ad1d7176ba 9 class MotorMove{
8mona 8:f7ad1d7176ba 10
8mona 8:f7ad1d7176ba 11 public:
8mona 8:f7ad1d7176ba 12 //DRV8830 motor; //Motor
8mona 8:f7ad1d7176ba 13 float vol_decel[DECEL_SIZE];
8mona 8:f7ad1d7176ba 14 float vol_accel[ACCEL_SIZE];
8mona 8:f7ad1d7176ba 15 float down_ratio;
8mona 8:f7ad1d7176ba 16
8mona 8:f7ad1d7176ba 17
8mona 8:f7ad1d7176ba 18
8mona 8:f7ad1d7176ba 19 void up_motor_set (int time_counter, int speed);
8mona 8:f7ad1d7176ba 20 void down_motor_set (int time_counter, int speed);
8mona 8:f7ad1d7176ba 21 float ReturnMotorVol(int time_counter, int sw_flag1,int sw_flag2);
8mona 8:f7ad1d7176ba 22
8mona 8:f7ad1d7176ba 23 private:
8mona 8:f7ad1d7176ba 24 int start_time_count;
8mona 8:f7ad1d7176ba 25 float Voltage;
8mona 8:f7ad1d7176ba 26
8mona 8:f7ad1d7176ba 27 int bflag_up;
8mona 8:f7ad1d7176ba 28 int bflag_down;
8mona 8:f7ad1d7176ba 29 };
8mona 8:f7ad1d7176ba 30
8mona 8:f7ad1d7176ba 31