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: FRDM-TFC mbed CBuffer XBEE mbed_angular_speed motor2 MMA8451Q
Fork of KL25Z_Camera_Test by
Revision 50:1cfe1f975b0c, committed 2017-04-27
- Comitter:
- lh14g13
- Date:
- Thu Apr 27 15:51:01 2017 +0000
- Parent:
- 49:0d4ad8dc265b
- Child:
- 51:6a84fbc404c8
- Commit message:
- added ability to change to torque based system
Changed in this revision
--- a/main.cpp Thu Apr 27 12:10:40 2017 +0000
+++ b/main.cpp Thu Apr 27 15:51:01 2017 +0000
@@ -160,17 +160,32 @@
switch(choice) {
case 0:
initPID(&servo_pid, 2.2f, 0.6f, 0.f);
+ if(!torque){
speed = 40;
+ }
+ else{
+ speed = 0.4;
+ }
ed_tune = man_tuner;
break;
case 1:
initPID(&servo_pid, 2.2f, 0.6f, 0.f);
+ if(!torque){
speed = 65;
+ }
+ else{
+ speed = 0.6
+ }
ed_tune = man_tuner;
break;
case 2:
initPID(&servo_pid, 2.2f, 0.6f, 0.f);
+ if(!torque){
speed = 80;
+ }
+ else{
+ speed= 0.8
+ }
ed_tune = man_tuner;
break;
case 3:
--- a/main.h Thu Apr 27 12:10:40 2017 +0000 +++ b/main.h Thu Apr 27 15:51:01 2017 +0000 @@ -128,7 +128,7 @@ float oldTime; int lapNo; - +bool torque = 1; //Accelerometer: float checkAcc(); float accTheshold=0.4;
--- a/motor2.lib Thu Apr 27 12:10:40 2017 +0000 +++ b/motor2.lib Thu Apr 27 15:51:01 2017 +0000 @@ -1,1 +1,1 @@ -http://developer.mbed.org/teams/GDP-4/code/motor2/#b46efc310b83 +http://developer.mbed.org/teams/GDP-4/code/motor2/#fec835dfd43a
