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: main.cpp
- Revision:
- 1:a95ba1510438
- Parent:
- 0:6d0671ae4648
- Child:
- 2:402b1a74fff6
--- a/main.cpp Mon Apr 23 11:28:11 2018 +0000 +++ b/main.cpp Mon Apr 23 11:57:53 2018 +0000 @@ -98,7 +98,7 @@ int IrR = iRSensor.codeR(); // min Distanz unterschritten = 1 int IrL = iRSensor.codeL(); int IrF = iRSensor.codeF(); - int caseDrive = stateMachine.drive(); //entscheidung welcher Drive Case + /*int caseDrive = stateMachine.drive();*/ //entscheidung welcher Drive Case printf ("IR Right = %d \n", IrR); @@ -126,20 +126,20 @@ wait (1.0); - /*switch (caseDrive){ - caseDrive '2': - buttonNow = button->read(); - if (buttonNow && !buttonBefore){*/ + if(caseDrive == 1){ fahren.geradeaus(); } else if (caseDrive == 2){ fahren.rechts90(); + fahren.geradeaus(); } else if (caseDrive == 3){ fahren.rechts270(); + fahren.geradeaus(); } else if (caseDrive == 4){ fahren.rechts180(); + fahren.geradeaus(); }