David Davis / Mbed 2 deprecated frdm_rfidd

Dependencies:   MFRC522 Terminal mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 
00002 
00003 #include "mbed.h"
00004 #include "MFRC522.h"
00005 #include "Terminal.h"
00006 #define RF_RESET PTD0
00007 
00008 Terminal PCout(USBTX, USBRX);
00009 //MFRC522 RFIDReader(PTD2, PTD3, PTD1, PTE25, PTD0);
00010 Serial device(D1, D0);
00011 
00012 
00013 int main (void){
00014     PCout.baud (38400);
00015     PCout.cls();
00016     wait_ms(50);
00017 
00018 
00019     
00020     while(1){
00021             char i[32];
00022             wait_ms(30);
00023             PCout.printf("done");
00024         if(device.readable()){
00025             device.gets(i, 32);
00026             PCout.printf("'%s'\n", i );
00027             }
00028     
00029 
00030   }  
00031     
00032     
00033     
00034     
00035     
00036 
00037 }
00038 
00039 
00040 
00041 
00042 
00043 
00044 
00045 
00046 
00047 
00048 
00049 
00050 
00051 
00052 
00053 
00054 
00055 
00056 
00057 
00058 
00059 
00060 
00061 
00062 
00063 
00064 
00065 
00066 
00067 
00068