für holdor

Dependencies:   Servo mbed pixy

Fork of PES by Gruppe 3

Revision:
8:6d9cd5ad332d
Parent:
6:4af735d26b7a
Child:
9:d9e46f9c9e40
--- a/Roboter.cpp	Tue Apr 11 15:42:22 2017 +0000
+++ b/Roboter.cpp	Tue Apr 18 12:09:46 2017 +0000
@@ -41,21 +41,25 @@
 
     if(sensors[0] < x && sensors[1] < x && sensors[5] < x) {  // alle sensoren aktiv, roboter fährt nach hinten
         offsetLin = -0.1f;
+        printf("Alle sensoren aktiv"); 
     }
 
     if(sensors[0].read() < x && sensors[5] > x) { // sensor vorne, roboter dreht nach links
         offsetDir = -0.05;
         offsetLin = 0;
+        printf(" sensoren vorne"); 
     }
     
     if(sensors[1] < x) {     // sensor rechts, roboter dreht nach links
         offsetDir = -0.05;
         offsetLin = 0;
+        printf("sensor rechts"); 
     }
     
     if(sensors[5] < x && sensors[1]>(x+0.02f)) {     // sensor links, roboter dreht nach rechts
         offsetDir = 0.05;
         offsetLin = 0;
+        printf("sensor links"); 
     }
 
     *pwmL = 0.5f+offsetDir+offsetLin; // Setzt die Duty-Cycle auf 50%