Biorobotics
/
piano_robot
newest version,
Embed:
(wiki syntax)
Show/hide line numbers
move_motor.h
00001 /* 00002 * move_motor.h 00003 * 00004 * Created on: Oct 20, 2015 00005 * Author: User 00006 */ 00007 00008 #ifndef MOVE_MOTOR_H_ 00009 #define MOVE_MOTOR_H_ 00010 00011 #include "QEI.h" 00012 #include "mbed.h" 00013 00014 Ticker aansturen; 00015 00016 volatile bool flag_motor; 00017 /* 00018 const double pulses_per_revolution; 00019 const double timestep; 00020 const int cw; 00021 const int ccw; 00022 */ 00023 00024 void Go_flag_motor(); 00025 double PI(double error, const double Kp, const double Ki, double Ts, double &e_int); 00026 void motor_Controller(DigitalOut &directionPin, PwmOut &pwm, double position, double setpoint, double Kp, double Ki, double error_rotation, double error_pulses); 00027 void move_motor(DigitalOut &directionPin, PwmOut &pwm, double position, double setpoint, double Kp, double Ki); 00028 00029 #endif /* MOVE_MOTOR_H_ */ 00030
Generated on Thu Aug 4 2022 19:30:43 by 1.7.2