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:
- 40:cdb079fc9d0a
- Parent:
- 39:4a0803d7575d
--- a/main.cpp Thu Mar 05 20:18:49 2015 +0000
+++ b/main.cpp Mon Mar 09 19:27:22 2015 +0000
@@ -32,7 +32,8 @@
float current_left_motor_speed = 0;
float current_right_motor_speed = 0;
- float dt = 0.00001;
+ float proportional = 0;
+ float last_proportional = 0;
float integral = 0;
float derivative = 0;
float output = 0;
@@ -65,6 +66,7 @@
int center_past_4 = 63;
//int best_guess_center = 64;
+ int position = 0;
int set_point = 63;
int previous_error = 0;
int error = 0;
@@ -187,6 +189,8 @@
center_past_2= center_past_1;
center_past_1= center_now;
+
+
/*
for(int i = 49; i >= 0; i--)
{
@@ -499,6 +503,7 @@
}// end imageready
}// end linescan stuff
}
+
}