Library for the Shield Bot by SeeedStudio

Dependents:   Seeed_Bot_Shield Seeed_BlueBot_demo Seeed_BlueBot_demo_test1 LAB03_Oppgav1 ... more

Fork of SeeedShieldBot by Components

Revision:
1:5c40f2a5e1ac
Parent:
0:227158f56a11
Child:
2:118efce95f3c
diff -r 227158f56a11 -r 5c40f2a5e1ac SeeedStudioShieldBot.cpp
--- 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;