newest version,

Dependencies:   QEI mbed

Committer:
roosbulthuis
Date:
Mon Oct 26 11:42:17 2015 +0000
Revision:
3:11c2175b4478
Parent:
0:fc6fa085d591
New file for filters without classes, check if input and output are correct. Should be pasted into main code.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
NickDGreg 0:fc6fa085d591 1 /*
NickDGreg 0:fc6fa085d591 2 * move_motor.h
NickDGreg 0:fc6fa085d591 3 *
NickDGreg 0:fc6fa085d591 4 * Created on: Oct 20, 2015
NickDGreg 0:fc6fa085d591 5 * Author: User
NickDGreg 0:fc6fa085d591 6 */
NickDGreg 0:fc6fa085d591 7
NickDGreg 0:fc6fa085d591 8 #ifndef MOVE_MOTOR_H_
NickDGreg 0:fc6fa085d591 9 #define MOVE_MOTOR_H_
NickDGreg 0:fc6fa085d591 10
NickDGreg 0:fc6fa085d591 11 #include "QEI.h"
NickDGreg 0:fc6fa085d591 12 #include "mbed.h"
NickDGreg 0:fc6fa085d591 13
NickDGreg 0:fc6fa085d591 14 Ticker aansturen;
NickDGreg 0:fc6fa085d591 15
NickDGreg 0:fc6fa085d591 16 volatile bool flag_motor;
NickDGreg 0:fc6fa085d591 17 /*
NickDGreg 0:fc6fa085d591 18 const double pulses_per_revolution;
NickDGreg 0:fc6fa085d591 19 const double timestep;
NickDGreg 0:fc6fa085d591 20 const int cw;
NickDGreg 0:fc6fa085d591 21 const int ccw;
NickDGreg 0:fc6fa085d591 22 */
NickDGreg 0:fc6fa085d591 23
NickDGreg 0:fc6fa085d591 24 void Go_flag_motor();
NickDGreg 0:fc6fa085d591 25 double PI(double error, const double Kp, const double Ki, double Ts, double &e_int);
NickDGreg 0:fc6fa085d591 26 void motor_Controller(DigitalOut &directionPin, PwmOut &pwm, double position, double setpoint, double Kp, double Ki, double error_rotation, double error_pulses);
NickDGreg 0:fc6fa085d591 27 void move_motor(DigitalOut &directionPin, PwmOut &pwm, double position, double setpoint, double Kp, double Ki);
NickDGreg 0:fc6fa085d591 28
NickDGreg 0:fc6fa085d591 29 #endif /* MOVE_MOTOR_H_ */
NickDGreg 0:fc6fa085d591 30