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
00001 #include "mbed.h" 00002 //#include "DRV8830.h" 00003 00004 00005 #define ACCEL_SIZE 6 00006 #define DECEL_SIZE 6 00007 #define LIMIT_TIME 30 00008 00009 class MotorMove{ 00010 00011 public: 00012 //DRV8830 motor; //Motor 00013 float vol_decel[DECEL_SIZE]; 00014 float vol_accel[ACCEL_SIZE]; 00015 float down_ratio; 00016 int bflag_up; 00017 int bflag_down; 00018 00019 00020 00021 void up_motor_set (int time_counter, float speed); 00022 void down_motor_set (int time_counter, float speed); 00023 float ReturnMotorVol(int time_counter, int sw_flag1,int sw_flag2); 00024 00025 private: 00026 int start_time_count; 00027 float Voltage; 00028 int accel_count; 00029 int decel_count; 00030 00031 }; 00032 00033
Generated on Wed Jul 13 2022 04:33:41 by
1.7.2
