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.
main.cpp
00001 #include "mbed.h" 00002 #include "include/EngineDriver.h" 00003 #include "include/SerialPrompt.h" 00004 #include "include/SR04.h" 00005 Serial pc(USBTX, USBRX); 00006 00007 int initDrivingUnit(int testLoops) 00008 { 00009 pc.printf("Testing engines...\n\r"); 00010 enableAll(); 00011 int i = 0; 00012 while(i < testLoops) 00013 { 00014 testEngines(); 00015 applyStates(); 00016 i++; 00017 } 00018 resetEngines(); 00019 enableAllButton.mode(PullDown); 00020 return 0; 00021 } 00022 int main() 00023 { 00024 // if(initDrivingUnit(1) == 0) 00025 // { 00026 // pc.printf("Ready to accept commands.\n\r Netrunner will start moving in 1 second"); 00027 // displayPrompt(&pc); 00028 // } 00029 // wait(1); 00030 while (true) 00031 { 00032 // checkEnableButtonState(); 00033 // displayMessage("clicks: %f", &pc, buttonClicks); 00034 // int action = getMenuInput(&pc); 00035 actualDistance = getDistance(0); 00036 pc.printf("test\n"); 00037 pc.printf("%d", actualDistance); 00038 wait(1); 00039 // if(actualDistance <= 10) 00040 // { 00041 // resetEngines(); 00042 // }else 00043 // { 00044 // forward(); 00045 // } 00046 // applyStates(); 00047 } 00048 }
Generated on Sat Jul 23 2022 13:11:59 by
1.7.2