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:
- 12:cd07a80f0a9a
- Parent:
- 11:474ad54d2595
- Child:
- 13:1687f97d4d82
diff -r 474ad54d2595 -r cd07a80f0a9a Fahren.cpp --- a/Fahren.cpp Tue May 08 09:22:32 2018 +0000 +++ b/Fahren.cpp Tue May 08 10:48:05 2018 +0000 @@ -17,8 +17,8 @@ //Konstruktor Fahren::Fahren(Controller& controller, EncoderCounter& counterLeft, EncoderCounter& counterRight, IRSensor& iRSensor): controller(controller), counterLeft(counterLeft), counterRight(counterRight), iRSensor (iRSensor){ -SpeedR = 90.0f; -SpeedL = 90.0f; +SpeedR = 100.0f; +SpeedL = 100.0f; disF = 0.0f; //ticker.attach(callback(this, &Fahren::reset), PERIOD); } @@ -39,8 +39,8 @@ initialClicksLeft = counterLeft.read(); //Anzahl Clicks die der Encoder zählen soll - wegRechts = 1769; - wegLinks = 1769; + wegRechts = 1675; + wegLinks = 1675; //Zustand, dass der Roboter nicht gestoppt hat @@ -50,7 +50,7 @@ reglerEinL = 1; while(1){ - float diff = (iRSensor.readR() - iRSensor.readL())*0.95f; //Regler + float diff = (iRSensor.readR() - iRSensor.readL())*0.85f; //Regler if(iRSensor.readR()>80.0f) diff=0; if(iRSensor.readL()>80.0f) diff=0; //printf("diff =%f \n",diff);