Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed QEI HIDScope biquadFilter MODSERIAL FastPWM
Diff: functions.h
- Revision:
- 43:9579a1afe9cb
- Parent:
- 40:82addb417220
- Child:
- 49:a9ed4f4cdef7
diff -r 7c4c41326cc6 -r 9579a1afe9cb functions.h --- a/functions.h Mon Oct 14 12:15:43 2019 +0000 +++ b/functions.h Mon Oct 14 14:06:39 2019 +0000 @@ -1,25 +1,10 @@ #ifndef header_h #define header_h -int AddInt(int a, int b); - -double ControllerPID(double e, double Ts); //e = error, Ts = sampling time -//void motorAndEncoder(float PWM1, float PWM2, float dt); - - + double ControllerPID(double e, double Ts); //e = error, Ts = sampling time + //void motorAndEncoder(float PWM1, float PWM2, float dt); + //Define global variables - //Define global variables - extern double X; //Input from EMG, signal X - //Define structures + const float PI = 3.14159265359; - -#endif - -//double motorAndEncoder(float voltage1, float periodMotor1, float voltage2, float periodMotor2, float dt, float &countsMotor1Return, float &countsMotor2Return, float &velocityMotor1Return, float &velocityMotor2Return); - //voltage in PWM (between -1 and 1), -1 for negative direction full power, 1 for positive direction full power - //period in seconds - //dt the time between measurements, i.o.w. Ticker timing, for velocity calculation - //Returns (velocityMotor1, velocityMotor2, countsMotor1[1], countsMotor2[0]) - //Velocity in radians/s - -//double ProcessEMG(double X); \ No newline at end of file +#endif \ No newline at end of file