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_V9 by
Diff: Fahren.cpp
- Revision:
- 2:402b1a74fff6
- Parent:
- 0:6d0671ae4648
- Child:
- 3:e4264cb5b9a9
--- 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){