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
main.cpp
- Committer:
- wengefa1
- Date:
- 2018-07-04
- Revision:
- 15:31d09ee65cf1
- Parent:
- 14:0caa7b93af7a
File content as of revision 15:31d09ee65cf1:
#include "mbed.h" #include "Controller.h" #include "MotorDriver.h" #include "ReadFinalLine.h" #include "ReadSensor.h" #include "Mapping.h" #include "AutoDrive.h" #include "RouteCalculation.h" DigitalIn ModeSwitch (PB_0); char* route; // inizialisieren der Karte int map[20][10]; bool mappingpassed = false; int main() { printf("startup"); startup(); wait(10); while(1) { // Mapping Modus if (ModeSwitch == 0) { //Modus Schalter abfrage wait(0.5); //Schalter entprellen if (mappingpassed == false){ //Mapping kann nicht zwei mal nacheinander abgefahren werden, autoDrive muss dazwischen aufgerufen werden printf("mapping"); mapping(map); mappingpassed = true; } } else { //Modus berechnen und Abfahren wait(0.5); //Schalter entprellen // Autodrive Modus printf("Route wird berechnet"); //route = RouteCalculation(map); printf("Berechnung Abgeschlossen"); mappingpassed = false; //wait(20); //printf("strecke wird abgefahren"); //autoDrive(route); } } }