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: header.h
- Revision:
- 22:4197629a300f
- Parent:
- 21:0a37e3280bbd
- Child:
- 23:767911637f3a
diff -r 0a37e3280bbd -r 4197629a300f header.h --- a/header.h Fri Oct 04 10:07:27 2019 +0000 +++ b/header.h Fri Oct 04 10:17:19 2019 +0000 @@ -1,7 +1,7 @@ double ControllerPID(double e, double Ts); //e = error, Ts = sampling time -double motorAndEncoder(float voltage1, float periodMotor1, float voltage2, float periodMotor2, float dt); +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