Biorobotics
/
piano_robot
newest version,
Diff: move_motor.h
- Revision:
- 0:fc6fa085d591
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/move_motor.h Fri Oct 23 13:14:57 2015 +0000 @@ -0,0 +1,30 @@ +/* + * move_motor.h + * + * Created on: Oct 20, 2015 + * Author: User + */ + +#ifndef MOVE_MOTOR_H_ +#define MOVE_MOTOR_H_ + +#include "QEI.h" +#include "mbed.h" + +Ticker aansturen; + +volatile bool flag_motor; +/* +const double pulses_per_revolution; +const double timestep; +const int cw; +const int ccw; +*/ + +void Go_flag_motor(); +double PI(double error, const double Kp, const double Ki, double Ts, double &e_int); +void motor_Controller(DigitalOut &directionPin, PwmOut &pwm, double position, double setpoint, double Kp, double Ki, double error_rotation, double error_pulses); +void move_motor(DigitalOut &directionPin, PwmOut &pwm, double position, double setpoint, double Kp, double Ki); + +#endif /* MOVE_MOTOR_H_ */ +