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.
Dependencies: mbed
Fork of Roboshark_V62 by
Revision 2:402b1a74fff6, committed 2018-04-23
- 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();
