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 rfid(PC_12, PD_2); //tx, rx 00003 Serial pc(PC_10, PC_11); 00004 00005 int main() 00006 { 00007 rfid.baud(9600);//RFID reader operates at 9600 baud 00008 pc.baud(9600); //speed(baud) 00009 pc.format(8,Serial::None,1); //format(bits,SerialBase,stop_bits) 00010 00011 int i; 00012 int RFID_read[15]; 00013 char *RFID_bon = "dc64850d3"; 00014 int RFID; 00015 char s[50]; 00016 pc.printf("\n\r START \n\r"); 00017 00018 while (1) 00019 { 00020 RFID=0; 00021 pc.printf("RFID_read1 : \r\n"); 00022 for(i=0;i<5;i++) 00023 RFID_read[i]=rfid.getc(); 00024 00025 // sprintf(s,"hello=%d%d%d%d%d",RFID_read[0],RFID_read[1],RFID_read[2],RFID_read[3],RFID_read[4]); 00026 // pc.printf("%s \r\n",s); //écrire sur pc 00027 // int num = atoi(s); 00028 // pc.printf("%d \r\n",num); //écrire sur pc 00029 00030 for(i=0;i<5;i++) 00031 RFID=RFID+RFID_read[i]; 00032 pc.printf("%d ", RFID); 00033 00034 } 00035 }
Generated on Mon Aug 15 2022 05:54:08 by
1.7.2