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 Serial gps(p9, p10); // TX, RX 00003 Serial pc(USBTX, USBRX); // TX, RX 00004 00005 //int main() 00006 //{ 00007 // printf("--Start--\r\n"); 00008 // printf("--Please Input Command--\r\n"); 00009 // while(1){ 00010 // for(int i=0;i<=5;i++){ 00011 // pc.printf("LOG VERSION\r\n"); 00012 // wait(1.0); 00013 // gps.printf("LOG VERSION\r\n"); 00014 // wait(1.0); 00015 // } 00016 // } 00017 //} 00018 00019 int main() 00020 { 00021 printf("--Start--\r\n"); 00022 printf("--Please Input Command--\r\n"); 00023 while(1){ 00024 char c=pc.getc(); 00025 switch (c){ 00026 case '1': 00027 pc.printf("LOG VERSION\r\n"); 00028 gps.printf("LOG VERSION\r\n"); 00029 break; 00030 case '2': 00031 pc.printf("LOG RXSTATUS\r\n"); 00032 gps.printf("LOG RXSTATUS\r\n"); 00033 break; 00034 case '3': 00035 pc.printf("LOG GPGGA\r\n"); 00036 gps.printf("LOG GPGGA\r\n"); 00037 break; 00038 case '4': 00039 pc.printf("LOG RANGE\r\n"); 00040 gps.printf("LOG RANGE\r\n"); 00041 break; 00042 case '5': 00043 pc.printf("LOG RANGEA\r\n"); 00044 gps.printf("LOG RANGEA\r\n"); 00045 break; 00046 case '6': 00047 pc.printf("LOG TIMEA\r\n"); 00048 gps.printf("LOG TIMEA\r\n"); 00049 break; 00050 } 00051 while(1){ 00052 pc.putc(gps.getc()); 00053 } 00054 } 00055 }
Generated on Mon Jul 18 2022 16:46:11 by
1.7.2