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 00003 Serial ant(D1, D0); //tx, rx 00004 Serial pc(D5,D4); 00005 char temp[8]; 00006 int b_ok = 0; 00007 int main() { 00008 pc.printf("AT$SF=%04x%04x\r\n",200,120); 00009 while(1) { 00010 // for(int i =0; i < 100; i++){ 00011 if(ant.readable()) 00012 { 00013 ant.gets(temp,4); 00014 for(int i =0; i < 4;i++){ 00015 if(temp[i]=='b') 00016 b_ok=1; 00017 } 00018 if(b_ok==0){ 00019 //pc.printf("AT$SF=%02x%02x\r\n",20,12); 00020 //wait(2); 00021 temp[0]='n'; 00022 break; 00023 } 00024 } 00025 //} 00026 pc.printf("com : %c",temp[0]); 00027 wait(0.5); 00028 b_ok = 0; 00029 //pc.printf(temp); 00030 } 00031 }
Generated on Fri Jul 15 2022 22:10:40 by
1.7.2