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.
Diff: main.cpp
- Revision:
- 19:85eb7991e2ab
- Parent:
- 17:c643b6b4a96f
- Child:
- 20:c728b8ffad97
--- a/main.cpp Wed Feb 25 19:35:14 2015 +0000
+++ b/main.cpp Thu Feb 26 16:30:55 2015 +0000
@@ -35,7 +35,7 @@
int violence_level = 0;
int set_point = 64;
- int previous error = 0;
+ int previous_error = 0;
int error = 0;
@@ -170,7 +170,7 @@
//current_left_motor_speed = current_left_motor_speed + float(64-black_center_value)*.0025;
//current_right_motor_speed = current_right_motor_speed + float(64-black_center_value)*.0025;
if (violence_level !=0){
- current_left_motor_speed = current_left_motor_speed + float(float(64-black_center_value)*.045);// kinda reverse this...
+ current_left_motor_speed = current_left_motor_speed + float(float(64-black_center_value)*.025);// kinda reverse this...
current_right_motor_speed = current_right_motor_speed + float(float(64-black_center_value)*.045);// push more forwards
}
@@ -200,7 +200,7 @@
//current_right_motor_speed = current_right_motor_speed - float(black_center_value-64)*.0025;
if (violence_level !=0){
current_left_motor_speed = current_left_motor_speed - float(float(black_center_value-64)*.045);// push more forwards
- current_right_motor_speed = current_right_motor_speed - float(float(black_center_value-64)*.045);// kinda reverse this...
+ current_right_motor_speed = current_right_motor_speed - float(float(black_center_value-64)*.025);// kinda reverse this...
}
// protection block