Valentin Bruchet / Mbed 2 deprecated a_ID12RFID_HelloWorld

Dependencies:   mbed ID12RFID

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 // Hello World for printing RFID tag numbers
00002 
00003 #include "mbed.h"
00004 #include "ID12RFID.h"
00005 
00006 ID12RFID rfid(PA_10);
00007 
00008 int main() 
00009 {
00010     while(1) 
00011     {
00012         if(rfid.readable()) 
00013         {
00014             printf("RFID Tag number : %d\n\r", rfid.read());
00015         }
00016         
00017     }
00018 }