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
00001 #include "mbed.h" 00002 #include "Controller.h" 00003 #include "MotorDriver.h" 00004 #include "ReadFinalLine.h" 00005 #include "ReadSensor.h" 00006 #include "Mapping.h" 00007 #include "AutoDrive.h" 00008 #include "RouteCalculation.h" 00009 00010 DigitalIn ModeSwitch (PB_0); 00011 char* route; 00012 00013 // inizialisieren der Karte 00014 int map[20][10]; 00015 bool mappingpassed = false; 00016 00017 00018 00019 int main() 00020 { 00021 printf("startup"); 00022 startup(); 00023 wait(10); 00024 00025 while(1) { 00026 // Mapping Modus 00027 if (ModeSwitch == 0) { //Modus Schalter abfrage 00028 wait(0.5); //Schalter entprellen 00029 if (mappingpassed == false){ //Mapping kann nicht zwei mal nacheinander abgefahren werden, autoDrive muss dazwischen aufgerufen werden 00030 printf("mapping"); 00031 mapping(map); 00032 mappingpassed = true; 00033 } 00034 } else { //Modus berechnen und Abfahren 00035 wait(0.5); //Schalter entprellen 00036 // Autodrive Modus 00037 printf("Route wird berechnet"); 00038 //route = RouteCalculation(map); 00039 printf("Berechnung Abgeschlossen"); 00040 mappingpassed = false; 00041 //wait(20); 00042 //printf("strecke wird abgefahren"); 00043 //autoDrive(route); 00044 } 00045 } 00046 } 00047
Generated on Fri Jul 15 2022 22:53:33 by
1.7.2