Roboshark / Mbed 2 deprecated Roboshark_V7

Dependencies:   mbed

Fork of Roboshark_V62 by Roboshark

Files at this revision

API Documentation at this revision

Comitter:
Jacqueline
Date:
Mon Apr 23 12:09:48 2018 +0000
Parent:
1:a95ba1510438
Child:
3:e4264cb5b9a9
Commit message:
new

Changed in this revision

Fahren.cpp Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/Fahren.cpp	Mon Apr 23 11:57:53 2018 +0000
+++ b/Fahren.cpp	Mon Apr 23 12:09:48 2018 +0000
@@ -162,16 +162,16 @@
     }
     
 
-//Implementation der Methode 180 Grad Rechtsdrehen
-void Fahren::rechts270() {
+//Implementation der Methode 90 Grad Linksdrehen
+void Fahren::links90() {
         
     //einlesen des aktuellen Encoder standes
     initialClicksRight = counterRight.read();   
     initialClicksLeft = counterLeft.read();
     
     //Anzahl Clicks die der Encoder zählen soll
-    wegRechts = 2632;
-    wegLinks = 2632;
+    wegRechts = 878;
+    wegLinks = 878;
     
     //Geschwindigkeit
     speedRight = 50;
@@ -182,8 +182,8 @@
     stopLeft = false;
     
     //Drehrichtung der Motoren
-    controller.setDesiredSpeedRight((speedRight));
-    controller.setDesiredSpeedLeft((speedLeft));
+    controller.setDesiredSpeedRight((-speedRight));
+    controller.setDesiredSpeedLeft((-speedLeft));
     
     while(1){
        
--- a/main.cpp	Mon Apr 23 11:57:53 2018 +0000
+++ b/main.cpp	Mon Apr 23 12:09:48 2018 +0000
@@ -83,7 +83,7 @@
         fahren.rechts180();
         wait(1.0f);
         
-        fahren.rechts270();
+        fahren.links90();
         wait(1.0f);*/
         
                                                                                 // IR Sensoren einlesen Programm Vincent
@@ -124,7 +124,7 @@
         
         printf("caseDrive = %d\n",caseDrive);
 
-        wait (1.0);
+        wait (0.5);
         
 
         
@@ -135,7 +135,7 @@
             fahren.rechts90();
             fahren.geradeaus();
         } else if (caseDrive == 3){
-            fahren.rechts270();
+            fahren.links90();
             fahren.geradeaus();
         } else if (caseDrive == 4){
             fahren.rechts180();