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.
Dependents: Seeed_Bot_Shield Seeed_BlueBot_demo Seeed_BlueBot_demo_test1 LAB03_Oppgav1 ... more
Fork of SeeedShieldBot by
Diff: SeeedStudioShieldBot.cpp
- Revision:
- 1:5c40f2a5e1ac
- Parent:
- 0:227158f56a11
- Child:
- 2:118efce95f3c
--- a/SeeedStudioShieldBot.cpp Mon Jul 15 13:16:09 2013 +0000
+++ b/SeeedStudioShieldBot.cpp Mon Jul 15 13:38:07 2013 +0000
@@ -99,19 +99,19 @@
// Give a value representative of the overall data received by the sensors...
// Output between +1 and -1.
// Positive is right, negative left...
-float SeeedStudioShieldBot::get_sensors_overall_value() {
+float SeeedStudioShieldBot::line_position() {
float output = 0;
if (rightSensor == 1) {
output += 0.5;
}
if (inRightSensor == 1) {
- output += 0.25;
+ output += 0.5;
}
if (leftSensor == 1) {
output -= 0.5;
}
if (inLeftSensor == 1) {
- output -= 0.25;
+ output -= 0.5;
}
return output;

Seeed Studio Shield Bot