Hello World for the ID12 RFID reader library

Dependencies:   mbed ID12RFID

Dependents:   ID12RFID_HelloWorld2

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(p14); // uart rx
00007 
00008 int main() {
00009     printf("Hello World\n");
00010     while(1) {
00011         if(rfid.readable()) {
00012             printf("RFID Tag number : %d\n", rfid.read());             
00013         }
00014     }
00015 }