Biorobotics
/
Controllerfunction
movemotor function. still to finish input variables and how to pass PWM and Direction pin and QEI
movemotor.h@0:7098cdb29180, 2015-10-19 (annotated)
- Committer:
- roosbulthuis
- Date:
- Mon Oct 19 13:43:58 2015 +0000
- Revision:
- 0:7098cdb29180
function for motor control we still need values for inputs and we dont know how to refer to PWM and directionPin. And how can we declare QEI wheel differently for two motors?
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
roosbulthuis | 0:7098cdb29180 | 1 | #ifndef MOVEMOTOR_H_ |
roosbulthuis | 0:7098cdb29180 | 2 | #define MOVEMOTOR_H_ |
roosbulthuis | 0:7098cdb29180 | 3 | |
roosbulthuis | 0:7098cdb29180 | 4 | void Go_flag_motor(); |
roosbulthuis | 0:7098cdb29180 | 5 | double PI(double error, const double Kp, const double Ki, double Ts, double &e_int); |
roosbulthuis | 0:7098cdb29180 | 6 | void motor1_Controller(); |
roosbulthuis | 0:7098cdb29180 | 7 | void move_motor(string state); |
roosbulthuis | 0:7098cdb29180 | 8 | |
roosbulthuis | 0:7098cdb29180 | 9 | Ticker aansturen; |
roosbulthuis | 0:7098cdb29180 | 10 | volatile bool flag_motor; |
roosbulthuis | 0:7098cdb29180 | 11 | QEI wheel (PTC10, PTC11, NC, 624); //how to call this? |
roosbulthuis | 0:7098cdb29180 | 12 | const double pulses_per_revolution; |
roosbulthuis | 0:7098cdb29180 | 13 | const double M1_timestep; |
roosbulthuis | 0:7098cdb29180 | 14 | const int cw; |
roosbulthuis | 0:7098cdb29180 | 15 | const int ccw; |
roosbulthuis | 0:7098cdb29180 | 16 | |
roosbulthuis | 0:7098cdb29180 | 17 | #endif /* MOVEMOTOR_H_ */ |