newest version,

Dependencies:   QEI mbed

Committer:
NickDGreg
Date:
Fri Oct 23 13:14:57 2015 +0000
Revision:
0:fc6fa085d591
move_motor compiles, working on filter.  Cannot pass AnalogIn as input, says no default constructor. Cannot pass as pinName as analogIn declared in constructor cannot be seen  by methods; ;

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