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 "ID12RFID.h" 00003 00004 ID12RFID rfid(PTD2); // uart rx 00005 Serial pc(USBTX,USBRX); 00006 00007 int main() 00008 { 00009 int fobflag; 00010 while(1) 00011 { 00012 switch(rfid.read()) 00013 { 00014 case 22311780: 00015 pc.printf("Hi, Matt\n"); 00016 wait(3); 00017 fobflag = 0X01; 00018 break; 00019 case 22352757: 00020 pc.printf("Hi, Peter\n"); 00021 wait(3); 00022 fobflag = 0X02; 00023 break; 00024 case 22319109: 00025 pc.printf("Hi, Kirill\n"); 00026 wait(3); 00027 fobflag = 0X03; 00028 break; 00029 case 22312052: 00030 pc.printf("Hi, Hao\n"); 00031 wait(3); 00032 fobflag = 0X04; 00033 break; 00034 } 00035 } 00036 00037 00038 // pc.printf("Hello World\n\r"); 00039 // while(1) { 00040 // if(rfid.readable()) { 00041 // pc.printf("RFID Tag number : %d\n\r", rfid.read()); 00042 // } 00043 // } 00044 }
Generated on Fri Aug 12 2022 12:42:20 by
1.7.2